public unsafe static void GetConsumerMessagesForConversationWithRequest(EngagementHistoryRequest request, [BlockProxy(typeof(ObjCRuntime.Trampolines.NIDActionArity1V0))] global::System.Action <NSArray> completion, [BlockProxy(typeof(ObjCRuntime.Trampolines.NIDActionArity1V1))] global::System.Action <NSError> failure) { if (request == null) { throw new ArgumentNullException("request"); } if (completion == null) { throw new ArgumentNullException("completion"); } if (failure == null) { throw new ArgumentNullException("failure"); } BlockLiteral *block_ptr_completion; BlockLiteral block_completion; block_completion = new BlockLiteral(); block_ptr_completion = &block_completion; block_completion.SetupBlockUnsafe(Trampolines.SDActionArity1V0.Handler, completion); BlockLiteral *block_ptr_failure; BlockLiteral block_failure; block_failure = new BlockLiteral(); block_ptr_failure = &block_failure; block_failure.SetupBlockUnsafe(Trampolines.SDActionArity1V1.Handler, failure); global::ApiDefinition.Messaging.void_objc_msgSend_IntPtr_IntPtr_IntPtr(class_ptr, Selector.GetHandle("getConsumerMessagesForConversationWithRequest:completion:failure:"), request.Handle, (IntPtr)block_ptr_completion, (IntPtr)block_ptr_failure); block_ptr_completion->CleanupBlock(); block_ptr_failure->CleanupBlock(); }
public VTStatus EncodeFrame(CVImageBuffer imageBuffer, CMTime presentationTimestamp, CMTime duration, NSDictionary frameProperties, IntPtr sourceFrame, out VTEncodeInfoFlags infoFlags, VTCompressionOutputHandler outputHandler) { if (Handle == IntPtr.Zero) { throw new ObjectDisposedException("CompressionSession"); } if (imageBuffer == null) { throw new ArgumentNullException("imageBuffer"); } if (outputHandler == null) { throw new ArgumentNullException("outputHandler"); } unsafe { var block = new BlockLiteral(); var blockPtr = █ block.SetupBlockUnsafe(compressionOutputHandlerTrampoline, outputHandler); try { return(VTCompressionSessionEncodeFrameWithOutputHandler(Handle, imageBuffer.Handle, presentationTimestamp, duration, frameProperties == null ? IntPtr.Zero : frameProperties.Handle, out infoFlags, blockPtr)); } finally { blockPtr->CleanupBlock(); } } }
public static IMTLDevice [] GetAllDevices(ref NSObject observer, MTLDeviceNotificationHandler handler) { if (observer == null) { throw new ArgumentNullException("observer"); } IntPtr handle = observer.Handle; unsafe { BlockLiteral *block_ptr_handler; BlockLiteral block_handler; block_handler = new BlockLiteral(); block_ptr_handler = &block_handler; block_handler.SetupBlockUnsafe(static_notificationHandler, handler); var rv = MTLCopyAllDevicesWithObserver(ref handle, (void *)block_ptr_handler); var obj = NSArray.ArrayFromHandle <IMTLDevice> (rv); if (handle != observer.Handle) { observer = Runtime.GetNSObject(handle); } return(obj); } }
public void Send(DispatchData?content, NWEndpoint?endpoint, NWContentContext context, Action <NWError?>?handler) { unsafe { if (handler == null) { nw_connection_group_send_message(GetCheckedHandle(), content.GetHandle(), endpoint.GetHandle(), context.GetCheckedHandle(), null); return; } BlockLiteral block_handler = new BlockLiteral(); block_handler.SetupBlockUnsafe(static_SendCompletion, handler); try { nw_connection_group_send_message(GetCheckedHandle(), content.GetHandle(), endpoint.GetHandle(), context.GetCheckedHandle(), &block_handler); } finally { block_handler.CleanupBlock(); } } }
public unsafe virtual void SetMethodCaller([BlockProxy(typeof(ObjCRuntime.Trampolines.NIDFlutterMethodCallHandler))] FlutterMethodCallHandler?handler) { BlockLiteral *block_ptr_handler; BlockLiteral block_handler; if (handler is null) { block_ptr_handler = null; } else { block_handler = new BlockLiteral(); block_ptr_handler = &block_handler; block_handler.SetupBlockUnsafe(Trampolines.SDFlutterMethodCallHandler.Handler, handler); } if (IsDirectBinding) { global::ApiDefinition.Messaging.void_objc_msgSend_IntPtr(this.Handle, Selector.GetHandle("setMethodCallHandler:"), (IntPtr)block_ptr_handler); } else { global::ApiDefinition.Messaging.void_objc_msgSendSuper_IntPtr(this.SuperHandle, Selector.GetHandle("setMethodCallHandler:"), (IntPtr)block_ptr_handler); } if (block_ptr_handler != null) { block_ptr_handler->CleanupBlock(); } }
public VTStatus DecodeFrame(CMSampleBuffer sampleBuffer, VTDecodeFrameFlags decodeFlags, out VTDecodeInfoFlags infoFlags, VTDecompressionOutputHandler outputHandler) { if (Handle == IntPtr.Zero) { throw new ObjectDisposedException("DecompressionSession"); } if (sampleBuffer == null) { throw new ArgumentNullException("sampleBuffer"); } if (outputHandler == null) { throw new ArgumentNullException("outputHandler"); } unsafe { var block = new BlockLiteral(); var blockPtr = █ block.SetupBlockUnsafe(decompressionOutputHandlerTrampoline, outputHandler); try { return(VTDecompressionSessionDecodeFrameWithOutputHandler(Handle, sampleBuffer.Handle, decodeFlags, out infoFlags, blockPtr)); } finally { blockPtr->CleanupBlock(); } } }
public unsafe static void BuildSetMultiValues(string[] values, string?key, CTLocalDataStore?dataStore, [BlockProxy(typeof(ObjCRuntime.Trampolines.NIDActionArity3V1))] global::System.Action <NSDictionary, NSArray, NSArray <CTValidationResult> > completion) { if (values == null) { ObjCRuntime.ThrowHelper.ThrowArgumentNullException(nameof(values)); } var dataStore__handle__ = dataStore.GetHandle(); if (completion == null) { ObjCRuntime.ThrowHelper.ThrowArgumentNullException(nameof(completion)); } var nsa_values = NSArray.FromStrings(values); var nskey = NSString.CreateNative(key); BlockLiteral *block_ptr_completion; BlockLiteral block_completion; block_completion = new BlockLiteral(); block_ptr_completion = &block_completion; block_completion.SetupBlockUnsafe(Trampolines.SDActionArity3V1.Handler, completion); global::ApiDefinition.Messaging.void_objc_msgSend_IntPtr_IntPtr_IntPtr_IntPtr(class_ptr, Selector.GetHandle("buildSetMultiValues:forKey:localDataStore:completionHandler:"), nsa_values.Handle, nskey, dataStore__handle__, (IntPtr)block_ptr_completion); nsa_values.Dispose(); NSString.ReleaseNative(nskey); block_ptr_completion->CleanupBlock(); }
public static NWProtocolDefinition CreateFramerDefinition(string identifier, NWFramerCreateFlags flags, Func <NWFramer, NWFramerStartResult> startCallback) { BlockLiteral block_handler = new BlockLiteral(); block_handler.SetupBlockUnsafe(static_CreateFramerHandler, startCallback); try { return(new NWProtocolDefinition(nw_framer_create_definition(identifier, flags, ref block_handler), owns: true)); } finally { block_handler.CleanupBlock(); } }
public void IterateProtocols(Action <NWProtocolOptions> callback) { BlockLiteral block_handler = new BlockLiteral(); block_handler.SetupBlockUnsafe(static_iterateHandler, callback); try { nw_protocol_stack_iterate_application_protocols(GetCheckedHandle(), ref block_handler); } finally { block_handler.CleanupBlock(); } }
public void SetPathChangedHandler(Action <NWPath> callback) { BlockLiteral block_handler = new BlockLiteral(); block_handler.SetupBlockUnsafe(static_PathChanged, callback); try { nw_connection_set_path_changed_handler(GetCheckedHandle(), ref block_handler); } finally { block_handler.CleanupBlock(); } }
internal static unsafe void Invoke(Action codeToRun, Action <IntPtr> invoker) { BlockLiteral *block_ptr; BlockLiteral block; block = new BlockLiteral(); block_ptr = █ block.SetupBlockUnsafe(Trampolines.SDAction.Handler, codeToRun); invoker((IntPtr)block_ptr); block_ptr->CleanupBlock(); }
public void RequestAccess(Action <bool, NSError?> onCompleted) { if (onCompleted is null) { throw new ArgumentNullException(nameof(onCompleted)); } var block_handler = new BlockLiteral(); block_handler.SetupBlockUnsafe(static_completionHandler, onCompleted); ABAddressBookRequestAccessWithCompletion(Handle, ref block_handler); block_handler.CleanupBlock(); }
public void EnumerateCaretOffsets(CaretEdgeEnumerator enumerator) { if (enumerator is null) { throw new ArgumentNullException(nameof(enumerator)); } var block_handler = new BlockLiteral(); block_handler.SetupBlockUnsafe(static_enumerate, enumerator); CTLineEnumerateCaretOffsets(Handle, ref block_handler); block_handler.CleanupBlock(); }
public static void RequestFonts(CTFontDescriptor[] fontDescriptors, CTFontManagerRequestFontsHandler completionHandler) { if (completionHandler == null) { throw new ArgumentNullException(nameof(completionHandler)); } using (var arr = EnsureNonNullArray(fontDescriptors, nameof(fontDescriptors))) { BlockLiteral block_handler = new BlockLiteral(); block_handler.SetupBlockUnsafe(requestCallback, completionHandler); CTFontManagerRequestFonts(arr.Handle, ref block_handler); block_handler.CleanupBlock(); } }
public bool ParseInput (nuint minimumIncompleteLength, nuint maximumLength, Memory<byte> tempBuffer, NWFramerParseCompletionDelegate handler) { if (handler == null) throw new ArgumentNullException (nameof (handler)); unsafe { BlockLiteral block_handler = new BlockLiteral (); block_handler.SetupBlockUnsafe (static_ParseInputHandler, handler); try { using (var mh = tempBuffer.Pin ()) return nw_framer_parse_input (GetCheckedHandle (), minimumIncompleteLength, maximumLength, (byte*)mh.Pointer, ref block_handler); } finally { block_handler.CleanupBlock (); } } }
static IntPtr create(DispatchBlockFlags flags, DispatchQualityOfService qosClass, int relative_priority, Action action) { if (action == null) { throw new ArgumentNullException(nameof(action)); } BlockLiteral block_handler = new BlockLiteral(); try { block_handler.SetupBlockUnsafe(BlockStaticDispatchClass.static_dispatch_block, action); return(dispatch_block_create_with_qos_class((nuint)(ulong)flags, qosClass, relative_priority, ref block_handler)); } finally { block_handler.CleanupBlock(); } }
public unsafe static void InitializeInboxWithCallback(this CleverTap This, [BlockProxy(typeof(ObjCRuntime.Trampolines.NIDCleverTapInboxSuccessBlock))] CleverTapInboxSuccessBlock callback) { if (callback == null) { throw new ArgumentNullException("callback"); } BlockLiteral *block_ptr_callback; BlockLiteral block_callback; block_callback = new BlockLiteral(); block_ptr_callback = &block_callback; block_callback.SetupBlockUnsafe(Trampolines.SDCleverTapInboxSuccessBlock.Handler, callback); global::ApiDefinition.Messaging.void_objc_msgSend_IntPtr(This.Handle, Selector.GetHandle("initializeInboxWithCallback:"), (IntPtr)block_ptr_callback); block_ptr_callback->CleanupBlock(); }
public unsafe static void RegisterInboxUpdatedBlock(this CleverTap This, [BlockProxy(typeof(ObjCRuntime.Trampolines.NIDCleverTapInboxUpdatedBlock))] CleverTapInboxUpdatedBlock block) { if (block == null) { throw new ArgumentNullException("block"); } BlockLiteral *block_ptr_block; BlockLiteral block_block; block_block = new BlockLiteral(); block_ptr_block = &block_block; block_block.SetupBlockUnsafe(Trampolines.SDCleverTapInboxUpdatedBlock.Handler, block); global::ApiDefinition.Messaging.void_objc_msgSend_IntPtr(This.Handle, Selector.GetHandle("registerInboxUpdatedBlock:"), (IntPtr)block_ptr_block); block_ptr_block->CleanupBlock(); }
public void EnumerateResolutions(Action <NWReportResolutionSource, TimeSpan, int, NWEndpoint, NWEndpoint> handler) { if (handler == null) { throw new ArgumentNullException(nameof(handler)); } BlockLiteral block_handler = new BlockLiteral(); block_handler.SetupBlockUnsafe(static_ResolutionEnumeratorHandler, handler); try { nw_establishment_report_enumerate_resolutions(GetCheckedHandle(), ref block_handler); } finally { block_handler.CleanupBlock(); } }
public void EnumerateProtocols(Action <NWProtocolDefinition, TimeSpan, TimeSpan> handler) { if (handler == null) { throw new ArgumentNullException(nameof(handler)); } BlockLiteral block_handler = new BlockLiteral(); block_handler.SetupBlockUnsafe(static_EnumerateProtocolsHandler, handler); try { nw_establishment_report_enumerate_protocols(GetCheckedHandle(), ref block_handler); } finally { block_handler.CleanupBlock(); } }
static IntPtr create(Action action, DispatchBlockFlags flags) { if (action == null) { throw new ArgumentNullException(nameof(action)); } BlockLiteral block_handler = new BlockLiteral(); try { block_handler.SetupBlockUnsafe(BlockStaticDispatchClass.static_dispatch_block, action); return(dispatch_block_create((nuint)(ulong)flags, ref block_handler)); } finally { block_handler.CleanupBlock(); } }
public bool GetValue(string key, NWTxtRecordGetValueDelegete handler) { if (handler == null) { throw new ArgumentNullException(nameof(handler)); } BlockLiteral block_handler = new BlockLiteral(); block_handler.SetupBlockUnsafe(static_AccessKeyHandler, handler); try { return(nw_txt_record_access_key(GetCheckedHandle(), key, ref block_handler)); } finally { block_handler.CleanupBlock(); } }
public bool Apply(NWTxtRecordApplyDelegate2 handler) { if (handler == null) { throw new ArgumentNullException(nameof(handler)); } BlockLiteral block_handler = new BlockLiteral(); block_handler.SetupBlockUnsafe(static_ApplyHandler, handler); try { return(nw_txt_record_apply(GetCheckedHandle(), ref block_handler)); } finally { block_handler.CleanupBlock(); } }
public void EnumerateInterfaces(Action <NWInterface> handler) { if (handler == null) { throw new ArgumentNullException(nameof(handler)); } BlockLiteral block_handler = new BlockLiteral(); block_handler.SetupBlockUnsafe(static_EnumerateInterfacesHandler, handler); try { nw_browse_result_enumerate_interfaces(GetCheckedHandle(), ref block_handler); } finally { block_handler.CleanupBlock(); } }
public bool GetRawBytes(NWTxtRecordGetRawByteDelegate handler) { if (handler == null) { throw new ArgumentNullException(nameof(handler)); } BlockLiteral block_handler = new BlockLiteral(); block_handler.SetupBlockUnsafe(static_RawBytesHandler, handler); try { return(nw_txt_record_access_bytes(GetCheckedHandle(), ref block_handler)); } finally { block_handler.CleanupBlock(); } }
public static void RegisterFonts(NSUrl [] fontUrls, CTFontManagerScope scope, bool enabled, CTFontRegistrationHandler registrationHandler) { using (var arr = EnsureNonNullArray(fontUrls, nameof(fontUrls))) { if (registrationHandler == null) { CTFontManagerRegisterFontURLs(arr.Handle, scope, enabled, IntPtr.Zero); } else { BlockLiteral block_handler = new BlockLiteral(); block_handler.SetupBlockUnsafe(callback, registrationHandler); CTFontManagerRegisterFontURLs(arr.Handle, scope, enabled, ref block_handler); block_handler.CleanupBlock(); } } }
public static void UnregisterFontDescriptors(CTFontDescriptor[] fontDescriptors, CTFontManagerScope scope, CTFontRegistrationHandler registrationHandler) { using (var arr = EnsureNonNullArray(fontDescriptors, nameof(fontDescriptors))) { if (registrationHandler == null) { CTFontManagerUnregisterFontDescriptors(arr.Handle, scope, IntPtr.Zero); } else { BlockLiteral block_handler = new BlockLiteral(); block_handler.SetupBlockUnsafe(callback, registrationHandler); CTFontManagerUnregisterFontDescriptors(arr.Handle, scope, ref block_handler); block_handler.CleanupBlock(); } } }
public void EnumerateSubprotocols(Action <string> handler) { if (handler == null) { throw new ArgumentNullException(nameof(handler)); } BlockLiteral block_handler = new BlockLiteral(); block_handler.SetupBlockUnsafe(static_EnumerateSubprotocolHandler, handler); try { nw_ws_request_enumerate_subprotocols(GetCheckedHandle(), ref block_handler); } finally { block_handler.CleanupBlock(); } }
public void Receive(uint minimumIncompleteLength, uint maximumLength, NWConnectionReceiveCompletion callback) { if (callback == null) { throw new ArgumentNullException(nameof(callback)); } BlockLiteral block_handler = new BlockLiteral(); block_handler.SetupBlockUnsafe(static_ReceiveCompletion, callback); try { nw_connection_receive(GetCheckedHandle(), minimumIncompleteLength, maximumLength, ref block_handler); } finally { block_handler.CleanupBlock(); } }
public static void RegisterFonts(string[] assetNames, CFBundle bundle, CTFontManagerScope scope, bool enabled, CTFontRegistrationHandler registrationHandler) { using (var arr = EnsureNonNullArray(assetNames, nameof(assetNames))) { if (registrationHandler == null) { CTFontManagerRegisterFontsWithAssetNames(arr.Handle, bundle.GetHandle(), scope, enabled, IntPtr.Zero); } else { BlockLiteral block_handler = new BlockLiteral(); block_handler.SetupBlockUnsafe(callback, registrationHandler); CTFontManagerRegisterFontsWithAssetNames(arr.Handle, bundle.GetHandle(), scope, enabled, ref block_handler); block_handler.CleanupBlock(); } } }