コード例 #1
0
 public void Setup()
 {
     // Create a new array
     nativeArray = MessageSend.IntPtr_objc_msgSend(MessageSend.IntPtr_objc_msgSend(mutablearray_class, Selector.GetHandle("alloc")), Selector.GetHandle("init"));
     for (var i = 0; i < ArraySize; i++)
     {
         var element = MessageSend.IntPtr_objc_msgSend(MessageSend.IntPtr_objc_msgSend(nsobject_class, Selector.GetHandle("alloc")), Selector.GetHandle("init"));
         MessageSend.void_objc_msgSend_IntPtr(nativeArray, Selector.GetHandle("addObject:"), element);
         MessageSend.void_objc_msgSend(element, Selector.GetHandle("release"));
     }
     MessageSend.void_objc_msgSend_IntPtr(obj.Handle, Selector.GetHandle("setSomeArray:"), nativeArray);
 }
コード例 #2
0
 public void CallExportedStaticMethod()
 {
     MessageSend.void_objc_msgSend(subclassed_class, Selector.GetHandle("exportedStaticMethod"));
 }
コード例 #3
0
 public void CallExportedInstanceMethod()
 {
     MessageSend.void_objc_msgSend(subclassed.Handle, Selector.GetHandle("exportedInstanceMethod"));
 }
コード例 #4
0
 public void CallOverriddenInstanceMethod()
 {
     MessageSend.void_objc_msgSend(subclassed.Handle, Selector.GetHandle("V"));
 }
コード例 #5
0
 public void Cleanup()
 {
     // cleanup after us
     MessageSend.void_objc_msgSend(nativeArray, Selector.GetHandle("release"));
     nativeArray = IntPtr.Zero;
 }
コード例 #6
0
 public void CallReturnUnknownManagedWrapperCleanup()
 {
     // cleanup after us
     MessageSend.void_objc_msgSend(someObjectUnknownManagedWrapper, Selector.GetHandle("release"));
     someObjectUnknownManagedWrapper = IntPtr.Zero;
 }