public static bool IsTypeOf(INETWISEDriverSink2 WISE, DatabaseHandle hDatabase, ObjectHandle hObject) { uint result = WISEError.WISE_ERROR; AttributeHandle hAttr = WISEConstants.WISE_INVALID_HANDLE; string strEntityType = string.Empty; if ((WISE == null) || (hObject == WISEConstants.WISE_INVALID_HANDLE)) { return false; } result = WISE.GetAttributeHandle(hDatabase, hObject, WISEConstants.WISE_TEMPLATE_OBJECT_TYPE, ref hAttr); if (WISEError.CheckCallFailed(result)) { return false; } result = WISE.GetAttributeValue(hDatabase, hObject, hAttr, ref strEntityType); return WISEError.CheckCallSucceeded(result) && IsTypeOf(strEntityType); }