public NodeId GetAnnotationsPropertyNodeId(Session session, HdaItemHandle itemHandle)
{
// check handle.
InternalHandle handle = itemHandle as InternalHandle;
if (handle == null)
{
return null;
}
// look up the supported attributes for an item.
ReadValueIdCollection supportedAttributes = handle.Item.SupportedAttributes;
if (supportedAttributes == null)
{
handle.Item.SupportedAttributes = supportedAttributes = GetAvailableAttributes(session, handle.NodeId);
}
// check if annotations are supported.
ReadValueId valueToRead = GetReadValueId(supportedAttributes, ComHdaProxy.INTERNAL_ATTRIBUTE_ANNOTATION);
if (valueToRead == null)
{
return null;
}
// return node id.
return valueToRead.NodeId;
}