Opc.Ua.Server.NodeSource.AddChild C# (CSharp) Method

AddChild() protected method

Adds a child to the node.
protected AddChild ( NodeSource child ) : void
child NodeSource
return void
        protected void AddChild(NodeSource child)
        {
            if (m_children == null)
            {
                m_children = new List<NodeSource>();
            }

            m_children.Add(child);
        }

Usage Example

コード例 #1
0
 /// <summary>
 /// Associates the object with a server (mandatory) and its model parent (optional).
 /// </summary>
 protected NodeSource(
     IServerInternal server,
     NodeSource      parent)
 {
     if (server == null) throw new ArgumentNullException("server");
     
     m_server     = server;
     m_parent     = parent;
     m_references = new ReferenceCollection();
     
     if (parent != null)
     {
         m_lock = parent.m_lock;
         parent.AddChild(this);
     }
 }