Opc.Ua.Sample.CustomNodeManager2.AddPredefinedNode C# (CSharp) Method

AddPredefinedNode() protected method

Recursively indexes the node and its children.
protected AddPredefinedNode ( ISystemContext context, NodeState node ) : void
context ISystemContext
node NodeState
return void
        protected virtual void AddPredefinedNode(ISystemContext context, NodeState node)
        {
            NodeState activeNode = AddBehaviourToPredefinedNode(context, node);
            m_predefinedNodes[activeNode.NodeId] = activeNode;
            
            BaseTypeState type = activeNode as BaseTypeState;

            if (type != null)
            {
                AddTypesToTypeTree(type);
            }

            List<BaseInstanceState> children = new List<BaseInstanceState>();
            activeNode.GetChildren(context, children);

            for (int ii = 0; ii < children.Count; ii++)
            {
                AddPredefinedNode(context, children[ii]);
            }
        }