Opc.Ua.NodeBrowser.Add C# (CSharp) Method

Add() public method

Adds a reference to target entity.
public Add ( IReference reference ) : void
reference IReference
return void
        public virtual void Add(IReference reference)
        {
            lock (DataLock)
            {
                m_references.Add(reference);
            }
        }
        

Same methods

NodeBrowser::Add ( Opc.Ua.NodeId referenceTypeId, bool isInverse, Opc.Ua.ExpandedNodeId targetId ) : void
NodeBrowser::Add ( Opc.Ua.NodeId referenceTypeId, bool isInverse, NodeState target ) : void

Usage Example

コード例 #1
0
        /// <summary>
        /// Populates the browser with references that meet the criteria.
        /// </summary>
        /// <param name="context">The context for the current operation.</param>
        /// <param name="browser">The browser to populate.</param>
        protected override void PopulateBrowser(ISystemContext context, NodeBrowser browser)
        {
            base.PopulateBrowser(context, browser);

            if (!NodeId.IsNull(m_superTypeId))
            {
                if (browser.IsRequired(ReferenceTypeIds.HasSubtype, true))
                {
                    browser.Add(ReferenceTypeIds.HasSubtype, true, m_superTypeId);
                }
            }

            // use the type table to find the subtypes.
            if (context.TypeTable != null && this.NodeId != null)
            {
                if (browser.IsRequired(ReferenceTypeIds.HasSubtype, false))
                {
                    IList <NodeId> subtypeIds = context.TypeTable.FindSubTypes(this.NodeId);

                    for (int ii = 0; ii < subtypeIds.Count; ii++)
                    {
                        browser.Add(ReferenceTypeIds.HasSubtype, false, subtypeIds[ii]);
                    }
                }
            }
        }
All Usage Examples Of Opc.Ua.NodeBrowser::Add