Opc.Ua.Server.TypeSourceTable.SetTypeSource C# (CSharp) Method

SetTypeSource() public method

Sets the source for a types that has shared components defined.
Removes the entry from the table if the source is null.
public SetTypeSource ( NodeId typeId, BaseTypeSource source ) : void
typeId NodeId
source BaseTypeSource
return void
        public void SetTypeSource(NodeId typeId, BaseTypeSource source)
        {
            if (NodeId.IsNull(typeId))
            {
                throw new ArgumentNullException("typeId");
            }
            
            lock (m_lock)
            {
                if (source != null)
                {
                    m_sources[typeId] = source;
                }
                else
                {
                    m_sources.Remove(typeId);
                }
            }
        }
        #endregion