public bool IsTypeOf(ExpandedNodeId subTypeId, ExpandedNodeId superTypeId)
{
if (NodeId.IsNull(subTypeId) || subTypeId.ServerIndex != 0)
{
return false;
}
if (NodeId.IsNull(superTypeId) || superTypeId.ServerIndex != 0)
{
return false;
}
// check for exact match.
if (subTypeId == superTypeId)
{
return true;
}
NodeId startId = ExpandedNodeId.ToNodeId(subTypeId, m_namespaceUris);
if (startId == null)
{
return false;
}
NodeId targetId = ExpandedNodeId.ToNodeId(superTypeId, m_namespaceUris);
if (targetId == null)
{
return false;
}
lock (m_lock)
{
TypeInfo typeInfo = null;
if (!m_nodes.TryGetValue(startId, out typeInfo))
{
return false;
}
return typeInfo.IsTypeOf(targetId);
}
}