/// <summary> /// Initializes a new instance of the <see cref="TaskContainer"/> class. /// </summary> /// <param name="cancellationToken">Token that is used to cancel tasks.</param> /// <param name="statusAccumulator">Task status accumulator object to track tasks success/failure status. /// </param> /// <param name="guessEstimation">Starting apriori estimation. Will be updated automatically if it becomes /// clear that there is more work to be done than estimated.</param> public TaskContainer( CancellationToken cancellationToken, TaskStatusAccumulator statusAccumulator, int guessEstimation = 0) { this.CancellationToken = cancellationToken; this.StatusAccumulator = statusAccumulator; this.guessEstimation = guessEstimation; if (guessEstimation != 0) { this.Estimation = guessEstimation; } }
public TaskContext(IIoLogger log, CancellationToken cancellationToken, TaskStatusAccumulator statusAccumulator) { this.Log = log; this.CancellationToken = cancellationToken; this.statusAccumulator = statusAccumulator; }