Ejemplo n.º 1
0
        public unsafe static void DeleteTag(string key, [BlockProxy(typeof(ObjCRuntime.Trampolines.NIDOSResultSuccessBlock))] OSResultSuccessBlock successBlock, [BlockProxy(typeof(ObjCRuntime.Trampolines.NIDOSFailureBlock))] OSFailureBlock failureBlock)
        {
            if (key == null)
            {
                throw new ArgumentNullException("key");
            }
            if (successBlock == null)
            {
                throw new ArgumentNullException("successBlock");
            }
            if (failureBlock == null)
            {
                throw new ArgumentNullException("failureBlock");
            }
            var           nskey = NSString.CreateNative(key);
            BlockLiteral *block_ptr_successBlock;
            BlockLiteral  block_successBlock;

            block_successBlock     = new BlockLiteral();
            block_ptr_successBlock = &block_successBlock;
            block_successBlock.SetupBlock(Trampolines.SDOSResultSuccessBlock.Handler, successBlock);
            BlockLiteral *block_ptr_failureBlock;
            BlockLiteral  block_failureBlock;

            block_failureBlock     = new BlockLiteral();
            block_ptr_failureBlock = &block_failureBlock;
            block_failureBlock.SetupBlock(Trampolines.SDOSFailureBlock.Handler, failureBlock);

            global::ApiDefinition.Messaging.void_objc_msgSend_IntPtr_IntPtr_IntPtr(class_ptr, Selector.GetHandle("deleteTag:onSuccess:onFailure:"), nskey, (IntPtr)block_ptr_successBlock, (IntPtr)block_ptr_failureBlock);
            NSString.ReleaseNative(nskey);
            block_ptr_successBlock->CleanupBlock();
            block_ptr_failureBlock->CleanupBlock();
        }
Ejemplo n.º 2
0
        public unsafe static void SendTags(NSDictionary keyValuePair, [BlockProxy(typeof(ObjCRuntime.Trampolines.NIDOSResultSuccessBlock))] OSResultSuccessBlock successBlock, [BlockProxy(typeof(ObjCRuntime.Trampolines.NIDOSFailureBlock))] OSFailureBlock failureBlock)
        {
            if (keyValuePair == null)
            {
                throw new ArgumentNullException("keyValuePair");
            }
            if (successBlock == null)
            {
                throw new ArgumentNullException("successBlock");
            }
            if (failureBlock == null)
            {
                throw new ArgumentNullException("failureBlock");
            }
            BlockLiteral *block_ptr_successBlock;
            BlockLiteral  block_successBlock;

            block_successBlock     = new BlockLiteral();
            block_ptr_successBlock = &block_successBlock;
            block_successBlock.SetupBlock(Trampolines.SDOSResultSuccessBlock.Handler, successBlock);
            BlockLiteral *block_ptr_failureBlock;
            BlockLiteral  block_failureBlock;

            block_failureBlock     = new BlockLiteral();
            block_ptr_failureBlock = &block_failureBlock;
            block_failureBlock.SetupBlock(Trampolines.SDOSFailureBlock.Handler, failureBlock);

            global::ApiDefinition.Messaging.void_objc_msgSend_IntPtr_IntPtr_IntPtr(class_ptr, Selector.GetHandle("sendTags:onSuccess:onFailure:"), keyValuePair.Handle, (IntPtr)block_ptr_successBlock, (IntPtr)block_ptr_failureBlock);
            block_ptr_successBlock->CleanupBlock();
            block_ptr_failureBlock->CleanupBlock();
        }
Ejemplo n.º 3
0
        public unsafe static void DeleteTags(NSObject[] keys, [BlockProxy(typeof(ObjCRuntime.Trampolines.NIDOSResultSuccessBlock))] OSResultSuccessBlock successBlock, [BlockProxy(typeof(ObjCRuntime.Trampolines.NIDOSFailureBlock))] OSFailureBlock failureBlock)
        {
            if (keys == null)
            {
                throw new ArgumentNullException("keys");
            }
            if (successBlock == null)
            {
                throw new ArgumentNullException("successBlock");
            }
            if (failureBlock == null)
            {
                throw new ArgumentNullException("failureBlock");
            }
            var           nsa_keys = NSArray.FromNSObjects(keys);
            BlockLiteral *block_ptr_successBlock;
            BlockLiteral  block_successBlock;

            block_successBlock     = new BlockLiteral();
            block_ptr_successBlock = &block_successBlock;
            block_successBlock.SetupBlock(Trampolines.SDOSResultSuccessBlock.Handler, successBlock);
            BlockLiteral *block_ptr_failureBlock;
            BlockLiteral  block_failureBlock;

            block_failureBlock     = new BlockLiteral();
            block_ptr_failureBlock = &block_failureBlock;
            block_failureBlock.SetupBlock(Trampolines.SDOSFailureBlock.Handler, failureBlock);

            global::ApiDefinition.Messaging.void_objc_msgSend_IntPtr_IntPtr_IntPtr(class_ptr, Selector.GetHandle("deleteTags:onSuccess:onFailure:"), nsa_keys.Handle, (IntPtr)block_ptr_successBlock, (IntPtr)block_ptr_failureBlock);
            nsa_keys.Dispose();
            block_ptr_successBlock->CleanupBlock();
            block_ptr_failureBlock->CleanupBlock();
        }
Ejemplo n.º 4
0
        public unsafe static void GetTags([BlockProxy(typeof(ObjCRuntime.Trampolines.NIDOSResultSuccessBlock))] OSResultSuccessBlock successBlock)
        {
            if (successBlock == null)
            {
                throw new ArgumentNullException("successBlock");
            }
            BlockLiteral *block_ptr_successBlock;
            BlockLiteral  block_successBlock;

            block_successBlock     = new BlockLiteral();
            block_ptr_successBlock = &block_successBlock;
            block_successBlock.SetupBlock(Trampolines.SDOSResultSuccessBlock.Handler, successBlock);

            global::ApiDefinition.Messaging.void_objc_msgSend_IntPtr(class_ptr, Selector.GetHandle("getTags:"), (IntPtr)block_ptr_successBlock);
            block_ptr_successBlock->CleanupBlock();
        }