Opc.Ua.BaseTypeState.PopulateBrowser C# (CSharp) Method

PopulateBrowser() protected method

Populates the browser with references that meet the criteria.
protected PopulateBrowser ( ISystemContext context, NodeBrowser browser ) : void
context ISystemContext The context for the current operation.
browser NodeBrowser The browser to populate.
return void
        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]);
                    }
                }
            }
        }
        #endregion