public virtual void Schedule(ScheduleBlock block) { if (block == null) { throw new ArgumentNullException(nameof(block)); } var blocklit = new BlockLiteral(); blocklit.SetupBlock(scheduleBlockProxy, block); try { unsafe { var blockref = &blocklit; LibObjc.void_objc_msgSend_IntPtr(this.Handle, selScheduleWithBlock, (IntPtr)blockref); } } finally { blocklit.CleanupBlock(); } }
public NSBackgroundActivityScheduler(string identifier) : base(LibObjc.IntPtr_objc_msgSend_IntPtr( Class.GetHandle(className), selAlloc, new NSString(identifier).Handle)) { LibObjc.void_objc_msgSend_IntPtr(Handle, selInitWithIdentifier, new NSString(identifier).Handle); }