/// <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; }
/// <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."); }
/// <summary> /// The register next. /// </summary> /// <param name="next"> /// The next. /// </param> public virtual void RegisterNext(IAttemptChainTaskHandler <T> next) { _next = next; }