コード例 #1
0
 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);
 }
コード例 #2
0
 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;
 }