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