Exemplo n.º 1
0
 public void Properties()
 {
     var obj = new object();
     var ptr = new IntPtr(1337);
     var handleRef = new HandleRef(obj, ptr);
     Assert.Equal(ptr, (IntPtr)handleRef);
     Assert.Equal(ptr, HandleRef.ToIntPtr(handleRef));
     Assert.Equal(ptr, handleRef.Handle);
     Assert.Same(obj, handleRef.Wrapper);
 }
Exemplo n.º 2
0
	public static int test_0_marshal_handleref_argument ()
	{
		object o = new object ();
		Console.WriteLine ("BEFORE");
		HandleRef s = new HandleRef (o, (IntPtr) 0xeadcafe);
		if (mono_xr (s) != (0xeadcafe + 1234))
			return 1;
		Console.WriteLine ("AFTER");
		return 0;
	}
Exemplo n.º 3
0
 public virtual void Dispose() {
   lock(this) {
     if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) {
       swigCMemOwn = false;
       ESLPINVOKE.delete_ESLconnection(swigCPtr);
     }
     swigCPtr = new HandleRef(null, IntPtr.Zero);
     GC.SuppressFinalize(this);
   }
 }
 public virtual void Dispose() {
 lock(this) {
     if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) {
       swigCMemOwn = false;
       mapscriptPINVOKE.delete_outputFormatObj(swigCPtr);
     }
     swigCPtr = new HandleRef(null, IntPtr.Zero);
     swigParentRef = null;
     GC.SuppressFinalize(this);
   }
 }
 public virtual void Dispose() {
   lock(this) {
     if (swigCPtr.Handle != IntPtr.Zero) {
       if (swigCMemOwn) {
         swigCMemOwn = false;
         AkSoundEnginePINVOKE.CSharp_delete_AkArrayAllocatorAlignedSimd(swigCPtr);
       }
       swigCPtr = new HandleRef(null, IntPtr.Zero);
     }
     GC.SuppressFinalize(this);
   }
 }
Exemplo n.º 6
0
	//
	// Mono should throw exceptions on ref HandleRefs
	//
	public static int test_0_ref_handleref ()
	{
		object o = new object ();
		HandleRef s = new HandleRef (o, (IntPtr) 0xeadcafe);
		try {
			mono_safe_handle_ref (ref s);
		} catch (MarshalDirectiveException){
			return 0;
		}
		// failed
		return 1;
	}
 public virtual void Dispose() {
   lock(this) {
     if (swigCPtr.Handle != IntPtr.Zero) {
       if (swigCMemOwn) {
         swigCMemOwn = false;
         OpenGLSupportPINVOKE.delete_DemoApplication(swigCPtr);
       }
       swigCPtr = new HandleRef(null, IntPtr.Zero);
     }
     GC.SuppressFinalize(this);
   }
 }
Exemplo n.º 8
0
 public virtual void Dispose() {
   lock(this) {
     if (swigCPtr.Handle != IntPtr.Zero) {
       if (swigCMemOwn) {
         swigCMemOwn = false;
         AssimpPINVOKE.delete_aiVector2D(swigCPtr);
       }
       swigCPtr = new HandleRef(null, IntPtr.Zero);
     }
     GC.SuppressFinalize(this);
   }
 }
 public virtual void Dispose() {
   lock(this) {
     if (swigCPtr.Handle != IntPtr.Zero) {
       if (swigCMemOwn) {
         swigCMemOwn = false;
         examplePINVOKE.delete_EmployeeList(swigCPtr);
       }
       swigCPtr = new HandleRef(null, IntPtr.Zero);
     }
     GC.SuppressFinalize(this);
   }
 }
Exemplo n.º 10
0
 public virtual void Dispose() {
   lock(this) {
     if (swigCPtr.Handle != IntPtr.Zero) {
       if (swigCMemOwn) {
         swigCMemOwn = false;
         libtischPINVOKE.delete_MatcherTUIOInput(swigCPtr);
       }
       swigCPtr = new HandleRef(null, IntPtr.Zero);
     }
     GC.SuppressFinalize(this);
   }
 }
Exemplo n.º 11
0
 public virtual void Dispose() {
   lock(this) {
     if (swigCPtr.Handle != IntPtr.Zero) {
       if (swigCMemOwn) {
         swigCMemOwn = false;
         modshogunPINVOKE.delete_WordMatrix(swigCPtr);
       }
       swigCPtr = new HandleRef(null, IntPtr.Zero);
     }
     GC.SuppressFinalize(this);
   }
 }
Exemplo n.º 12
0
 public virtual void Dispose() {
   lock(this) {
     if (swigCPtr.Handle != IntPtr.Zero) {
       if (swigCMemOwn) {
         swigCMemOwn = false;
         OPALPINVOKE.delete_OpalMessage(swigCPtr);
       }
       swigCPtr = new HandleRef(null, IntPtr.Zero);
     }
     GC.SuppressFinalize(this);
   }
 }
 public virtual void Dispose() {
   lock(this) {
     if (swigCPtr.Handle != IntPtr.Zero) {
       if (swigCMemOwn) {
         swigCMemOwn = false;
         AkSoundEnginePINVOKE.CSharp_delete_AkDeviceSettings(swigCPtr);
       }
       swigCPtr = new HandleRef(null, IntPtr.Zero);
     }
     GC.SuppressFinalize(this);
   }
 }
 public virtual void Dispose() {
   lock(this) {
     if (swigCPtr.Handle != IntPtr.Zero) {
       if (swigCMemOwn) {
         swigCMemOwn = false;
         VisionLabPINVOKE.delete_HeightWidth(swigCPtr);
       }
       swigCPtr = new HandleRef(null, IntPtr.Zero);
     }
     GC.SuppressFinalize(this);
   }
 }
 public virtual void Dispose() {
   lock(this) {
     if (swigCPtr.Handle != IntPtr.Zero) {
       if (swigCMemOwn) {
         swigCMemOwn = false;
         OpenGLSupportPINVOKE.delete_GL_DialogDynamicsWorld(swigCPtr);
       }
       swigCPtr = new HandleRef(null, IntPtr.Zero);
     }
     GC.SuppressFinalize(this);
   }
 }
 public virtual void Dispose() {
   lock(this) {
     if (swigCPtr.Handle != IntPtr.Zero) {
       if (swigCMemOwn) {
         swigCMemOwn = false;
         VisionLabPINVOKE.delete_BPN_FeatureOptimizer_Byte(swigCPtr);
       }
       swigCPtr = new HandleRef(null, IntPtr.Zero);
     }
     GC.SuppressFinalize(this);
   }
 }
Exemplo n.º 17
0
 public virtual void Dispose() {
   lock(this) {
     if (swigCPtr.Handle != IntPtr.Zero) {
       if (swigCMemOwn) {
         swigCMemOwn = false;
         AkSoundEnginePINVOKE.CSharp_delete_AkMusicPlaylistCallbackInfo(swigCPtr);
       }
       swigCPtr = new HandleRef(null, IntPtr.Zero);
     }
     GC.SuppressFinalize(this);
   }
 }
Exemplo n.º 18
0
 public virtual void Dispose()
 {
     lock(this) {
       if (swigCPtr.Handle != IntPtr.Zero) {
     if (swigCMemOwn) {
       swigCMemOwn = false;
       yarpPINVOKE.delete_IAmplifierControlRaw(swigCPtr);
     }
     swigCPtr = new HandleRef(null, IntPtr.Zero);
       }
       GC.SuppressFinalize(this);
     }
 }
Exemplo n.º 19
0
 public virtual void Dispose()
 {
     lock(this) {
       if (swigCPtr.Handle != IntPtr.Zero) {
     if (swigCMemOwn) {
       swigCMemOwn = false;
       keyspace_clientPINVOKE.delete_imaxdiv_t(swigCPtr);
     }
     swigCPtr = new HandleRef(null, IntPtr.Zero);
       }
       GC.SuppressFinalize(this);
     }
 }
Exemplo n.º 20
0
 public virtual void Dispose()
 {
     lock(this) {
       if (swigCPtr.Handle != IntPtr.Zero) {
     if (swigCMemOwn) {
       swigCMemOwn = false;
       ContextModulePINVOKE.delete_Instrument(swigCPtr);
     }
     swigCPtr = new HandleRef(null, IntPtr.Zero);
       }
       GC.SuppressFinalize(this);
     }
 }
 public override void Dispose() {
   lock(this) {
     if (swigCPtr.Handle != IntPtr.Zero) {
       if (swigCMemOwn) {
         swigCMemOwn = false;
         VisionLabPINVOKE.delete_BPN_ImageClassifier_Double(swigCPtr);
       }
       swigCPtr = new HandleRef(null, IntPtr.Zero);
     }
     GC.SuppressFinalize(this);
     base.Dispose();
   }
 }
Exemplo n.º 22
0
 public override void Dispose() {
   lock(this) {
     if (swigCPtr.Handle != IntPtr.Zero) {
       if (swigCMemOwn) {
         swigCMemOwn = false;
         modshogunPINVOKE.delete_SpectrumMismatchRBFKernel(swigCPtr);
       }
       swigCPtr = new HandleRef(null, IntPtr.Zero);
     }
     GC.SuppressFinalize(this);
     base.Dispose();
   }
 }
Exemplo n.º 23
0
 public override void Dispose() {
   lock(this) {
     if (swigCPtr.Handle != IntPtr.Zero) {
       if (swigCMemOwn) {
         swigCMemOwn = false;
         AkSoundEnginePINVOKE.CSharp_delete_WwiseObjectID(swigCPtr);
       }
       swigCPtr = new HandleRef(null, IntPtr.Zero);
     }
     GC.SuppressFinalize(this);
     base.Dispose();
   }
 }
Exemplo n.º 24
0
 public virtual void Dispose()
 {
     lock(this) {
       if (swigCPtr.Handle != IntPtr.Zero) {
     if (swigCMemOwn) {
       swigCMemOwn = false;
       yarpPINVOKE.delete_IAudioVisualGrabber(swigCPtr);
     }
     swigCPtr = new HandleRef(null, IntPtr.Zero);
       }
       GC.SuppressFinalize(this);
     }
 }
 public override void Dispose() {
   lock(this) {
     if (swigCPtr.Handle != IntPtr.Zero) {
       if (swigCMemOwn) {
         swigCMemOwn = false;
         modshogunPINVOKE.delete_LocalAlignmentStringKernel(swigCPtr);
       }
       swigCPtr = new HandleRef(null, IntPtr.Zero);
     }
     GC.SuppressFinalize(this);
     base.Dispose();
   }
 }
Exemplo n.º 26
0
 public virtual void Dispose()
 {
     lock(this) {
       if (swigCPtr.Handle != IntPtr.Zero) {
     if (swigCMemOwn) {
       swigCMemOwn = false;
       yarpPINVOKE.delete_GazeEventParameters(swigCPtr);
     }
     swigCPtr = new HandleRef(null, IntPtr.Zero);
       }
       GC.SuppressFinalize(this);
     }
 }
 public virtual void Dispose()
 {
     lock(this) {
       if (swigCPtr.Handle != IntPtr.Zero) {
     if (swigCMemOwn) {
       swigCMemOwn = false;
       yarpPINVOKE.delete_TypedReaderCallbackImageRgb(swigCPtr);
     }
     swigCPtr = new HandleRef(null, IntPtr.Zero);
       }
       GC.SuppressFinalize(this);
     }
 }
 public override void Dispose() {
   lock(this) {
     if (swigCPtr.Handle != IntPtr.Zero) {
       if (swigCMemOwn) {
         swigCMemOwn = false;
         modshogunPINVOKE.delete_MultitaskKernelTreeNormalizer(swigCPtr);
       }
       swigCPtr = new HandleRef(null, IntPtr.Zero);
     }
     GC.SuppressFinalize(this);
     base.Dispose();
   }
 }
Exemplo n.º 29
0
 public override void Dispose() {
   lock(this) {
     if (swigCPtr.Handle != IntPtr.Zero) {
       if (swigCMemOwn) {
         swigCMemOwn = false;
         modshogunPINVOKE.delete_StreamingByteFeatures(swigCPtr);
       }
       swigCPtr = new HandleRef(null, IntPtr.Zero);
     }
     GC.SuppressFinalize(this);
     base.Dispose();
   }
 }
Exemplo n.º 30
0
 internal static extern int vtkPCosmoHaloFinder_GetPMin_09(HandleRef pThis);
Exemplo n.º 31
0
 internal static extern int vtkPCosmoHaloFinder_GetSODCenterType_12(HandleRef pThis);
Exemplo n.º 32
0
 internal static extern void vtkPCosmoHaloFinder_SetRL_28(HandleRef pThis, float _arg);
Exemplo n.º 33
0
 internal static extern float vtkPCosmoHaloFinder_GetBB_01(HandleRef pThis);
Exemplo n.º 34
0
 internal static extern float vtkPCosmoHaloFinder_GetRhoCScale_11(HandleRef pThis);
Exemplo n.º 35
0
 internal static extern int vtkPCosmoHaloFinder_GetComputeMostConnectedParticle_03(HandleRef pThis);
Exemplo n.º 36
0
 internal static extern void vtkPCosmoHaloFinder_SetCopyHaloDataToParticles_24(HandleRef pThis, int _arg);
Exemplo n.º 37
0
 internal static extern void vtkPCosmoHaloFinder_SetController_23(HandleRef pThis, HandleRef arg0);
Exemplo n.º 38
0
 /// <summary>
 /// Effectively decrements the reference count of the native object
 /// at the give pointer. This is called when the object is disposed
 /// and should never be called anywhere else.
 /// </summary>
 /// <param name="selfPointer">Self pointer.</param>
 protected override void ReleaseHandle(HandleRef selfPointer)
 {
     CFFunctions.CFRelease(selfPointer);
 }
Exemplo n.º 39
0
 internal static extern void vtkPCosmoHaloFinder_SetOverlap_26(HandleRef pThis, float _arg);
Exemplo n.º 40
0
 internal static extern bool IntDestroyMenu(HandleRef hMenu);
Exemplo n.º 41
0
 internal static extern IntPtr vtkPCosmoHaloFinder_GetController_05(HandleRef pThis, ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount);
Exemplo n.º 42
0
 internal static extern int vtkPCosmoHaloFinder_GetComputeSOD_04(HandleRef pThis);
Exemplo n.º 43
0
 internal static extern void vtkPCosmoHaloFinder_SetComputeSOD_22(HandleRef pThis, int _arg);
Exemplo n.º 44
0
 internal static extern int vtkPCosmoHaloFinder_GetComputeMostBoundParticle_02(HandleRef pThis);
Exemplo n.º 45
0
 internal static extern int vtkPCosmoHaloFinder_GetNP_07(HandleRef pThis);
Exemplo n.º 46
0
 internal static extern void vtkPCosmoHaloFinder_SetSODCenterType_30(HandleRef pThis, int _arg);
Exemplo n.º 47
0
 internal static extern float vtkPCosmoHaloFinder_GetOverlap_08(HandleRef pThis);
Exemplo n.º 48
0
 internal static extern void vtkPCosmoHaloFinder_SetSODMassScale_31(HandleRef pThis, float _arg);
Exemplo n.º 49
0
 internal static extern void vtkPCosmoHaloFinder_SetComputeMostConnectedParticle_21(HandleRef pThis, int _arg);
Exemplo n.º 50
0
 internal static extern void vtkPCosmoHaloFinder_SetRhoCScale_29(HandleRef pThis, float _arg);
Exemplo n.º 51
0
 internal static extern IntPtr vtkPCosmoHaloFinder_SafeDownCast_18(HandleRef o, ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount);
Exemplo n.º 52
0
 internal static extern IntPtr vtkPCosmoHaloFinder_NewInstance_17(HandleRef pThis, ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount);
Exemplo n.º 53
0
 internal static extern int vtkPCosmoHaloFinder_GetCopyHaloDataToParticles_06(HandleRef pThis);
Exemplo n.º 54
0
 internal static extern int vtkPCosmoHaloFinder_IsA_14(HandleRef pThis, string type);
Exemplo n.º 55
0
	internal ListOfUnitDefinitions(IntPtr cPtr, bool cMemoryOwn) : base(libsbmlPINVOKE.ListOfUnitDefinitions_SWIGUpcast(cPtr), cMemoryOwn)
	{
		//super(libsbmlPINVOKE.ListOfUnitDefinitionsUpcast(cPtr), cMemoryOwn);
		swigCPtr = new HandleRef(this, cPtr);
	}
Exemplo n.º 56
0
 internal static extern float vtkPCosmoHaloFinder_GetSODMassScale_13(HandleRef pThis);
Exemplo n.º 57
0
 internal static extern IntPtr IntGetDC(HandleRef hWnd);
Exemplo n.º 58
0
 internal static extern void vtkPCosmoHaloFinder_SetPMin_27(HandleRef pThis, int _arg);
Exemplo n.º 59
0
 /// <summary>
 /// Effectively increments the reference count of the native object
 /// at the given pointer. This is called inside the base constructor
 /// and should never be called anywhere else.
 /// </summary>
 /// <param name="selfPointer">Self pointer.</param>
 protected override void AttachHandle(HandleRef selfPointer)
 {
     CFFunctions.CFRetain(selfPointer);
 }
Exemplo n.º 60
-1
 public static int test_0_handleref_return()
 {
     object
     o
     =
     new
     object
     ();
     HandleRef
     s
     =
     new
     HandleRef
     (o,
     (IntPtr)
     0xeadcafe);
     try
     {
     HandleRef
     ret
     =
     mono_xr_as_handle
     (s);
     }
     catch
     (MarshalDirectiveException){
     return
     0;
     }
     return
     1;
 }