public static DispatchBlock Create(Action action, DispatchBlockFlags flags, DispatchQualityOfService qosClass, int relative_priority) { if (action == null) { throw new ArgumentNullException(nameof(action)); } return(new DispatchBlock(action, flags, qosClass, relative_priority)); }
public static DispatchBlock Create(DispatchBlock block, DispatchBlockFlags flags, DispatchQualityOfService qosClass, int relative_priority) { if (block == null) { throw new ArgumentNullException(nameof(block)); } return(block.Create(flags, qosClass, relative_priority)); }
public static DispatchBlock Create(Action action, DispatchBlockFlags flags = DispatchBlockFlags.None) { if (action == null) { throw new ArgumentNullException(nameof(action)); } return(new DispatchBlock(action, flags)); }
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(); } }
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 DispatchBlock Create(DispatchBlockFlags flags, DispatchQualityOfService qosClass, int relative_priority) { return(new DispatchBlock(dispatch_block_create_with_qos_class((nuint)(ulong)flags, qosClass, relative_priority, GetCheckedHandle()), true)); }
public DispatchBlock(DispatchBlock dispatchBlock, DispatchBlockFlags flags, DispatchQualityOfService qosClass, int relative_priority) : base(dispatch_block_create_with_qos_class((nuint)(ulong) flags, qosClass, relative_priority, Runtime.ThrowOnNull(dispatchBlock, nameof(dispatchBlock)).GetCheckedHandle()), true) { }
public DispatchBlock(Action action, DispatchBlockFlags flags, DispatchQualityOfService qosClass, int relative_priority) : base(create(flags, qosClass, relative_priority, action), true) { }
public DispatchBlock(Action action, DispatchBlockFlags flags = DispatchBlockFlags.None) : base(create(action, flags), true) { }