public bool IsTypeOf(ExpandedNodeId subTypeId, ExpandedNodeId superTypeId)
{
if (subTypeId == superTypeId)
{
return true;
}
ILocalNode subtype = Find(subTypeId) as ILocalNode;
if (subtype == null)
{
return false;
}
ILocalNode supertype = subtype;
while (supertype != null)
{
ExpandedNodeId currentId = supertype.References.FindTarget(ReferenceTypeIds.HasSubtype, true, true, m_typeTree, 0);
if (currentId == superTypeId)
{
return true;
}
supertype = Find(currentId) as ILocalNode;
}
return false;
}