Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AttemptChainTaskHandler{T}"/> class.
        /// </summary>
        /// <param name="task">
        /// The task.
        /// </param>
        public AttemptChainTaskHandler(IAttemptChainTask <T> task)
        {
            Mandate.ParameterNotNull(task, "task");

            _task = task;

            // set the default next to the end of chain task
            _next = AttemptChainEndOfChainHandler <T> .Instance;
        }
Пример #2
0
 /// <summary>
 /// Registers the next task
 /// </summary>
 /// <param name="next"></param>
 public void RegisterNext(IAttemptChainTaskHandler <T> next)
 {
     throw new InvalidOperationException("Cannot register next on the end of chain.");
 }
Пример #3
0
 /// <summary>
 /// The register next.
 /// </summary>
 /// <param name="next">
 /// The next.
 /// </param>
 public virtual void RegisterNext(IAttemptChainTaskHandler <T> next)
 {
     _next = next;
 }