public IsEncodingOf ( ExpandedNodeId encodingId, ExpandedNodeId datatypeId ) : bool | ||
encodingId | ExpandedNodeId | The id the encoding node . |
datatypeId | ExpandedNodeId | The id of the DataType node. |
return | bool |
public bool IsEncodingOf(ExpandedNodeId encodingId, ExpandedNodeId datatypeId)
{
ILocalNode encoding = Find(encodingId) as ILocalNode;
if (encoding == null)
{
return false;
}
foreach (IReference reference in encoding.References.Find(ReferenceTypeIds.HasEncoding, true, true, m_typeTree))
{
if (reference.TargetId == datatypeId)
{
return true;
}
}
// no match.
return false;
}