internal AsyncOperationContext(TaskOperation op, TWork work, TExecutor executor, Task predecessor, OperationExecutionOptions options, CancellationToken cancellationToken) : base(op, work, predecessor, options, cancellationToken) { this.Executor = executor; this.ExecutorSource = new TaskCompletionSource <TExecutor>(this.ResultSource); }
internal OperationContext(TaskOperation op, TWork work, Task predecessor, OperationExecutionOptions options, CancellationToken cancellationToken) { this.Operation = op; this.Work = work ?? throw new ArgumentNullException(nameof(work)); this.Predecessor = predecessor; this.ResultSource = new TaskCompletionSource <TResult>(); this.Options = options; this.CancellationToken = cancellationToken; }