public ChainOfResponsibilityLink <T> Chain(IEnumerable <ChainOfResponsibilityLink <T> > handlers) { ChainOfResponsibilityLink <T> chainOfResponsibilityLink = null; foreach (ChainOfResponsibilityLink <T> handler in handlers) { chainOfResponsibilityLink = this.Chain(handler); } return(chainOfResponsibilityLink); }
public ChainOfResponsibilityLink <T> Chain(ChainOfResponsibilityLink <T> lastHandler) { if (this.Next != null) { this._lastLink.Chain(lastHandler); } else { this.Next = lastHandler; } this._lastLink = lastHandler; return(this); }