public NativeObject GetNativeObject() { if (!(this._pointer != UIntPtr.Zero)) { return((NativeObject)null); } NativeObject target = (NativeObject)this._weakReferenceCache.Target; if (target != (NativeObject)null) { return(target); } NativeObject nativeObject = (NativeObject)this._constructorInfo.Invoke(new object[1] { (object)this._pointer }); this._weakReferenceCache.Target = (object)nativeObject; return(nativeObject); }
internal static T CreateNativeObjectWrapper <T>(NativeObjectPointer nativeObjectPointer) where T : NativeObject => (T)NativeObject.CreateNativeObjectWrapper(nativeObjectPointer);