public ProductionNode FindExistingNode(NodeType type)
{
IntPtr nodeHandle;
int status = SafeNativeMethods.xnFindExistingRefNodeByType(this.InternalObject, type, out nodeHandle);
if (status != 0)
{
return null;
}
ProductionNode node = CreateProductionNodeObject(nodeHandle, type);
// release the handle
SafeNativeMethods.xnProductionNodeRelease(nodeHandle);
return node;
}