Example #1
0
 public T QueryInterface <T>() where T : NativeObject
 {
     try
     {
         if (managedObject is null)
         {
             if (NativeObject.TryGetClassID(this, out var classID))
             {
                 managedObject = NativeObjectFactory.Create(classID);
                 managedObject.SetHandle(this);
             }
         }
         return((T)managedObject);
     }
     catch
     {
         return(null);
     }
 }
Example #2
0
 private bool IsClassTest()
 {
     return(NativeObject.TryGetClassID(this, out _));
 }