public void AddNextLink(IChainLink <TSpecification, TResult> link) { if (_successor == null) { _successor = link; } else { _successor.AddNextLink(link); } }
public static IChainLink <TSpecification, TResult> Finally <TSpecification, TResult>(this IChainLink <TSpecification, TResult> chain, IChainLink <TSpecification, TResult> link) { chain.AddNextLink(link); return(chain); }