public void Add(IInterceptor <TContext> interceptor) { var newLink = new AdapterChainLinkInterceptor <TContext>(interceptor); if (first == null || last == null) { first = last = newLink; return; } last.Next = newLink; last = newLink; }
public void Merge(ChainInterceptor <TContext> other) { if (other.first == null || other.last == null) { return; } if (first == null || last == null) { first = other.first; last = other.last; return; } last.Next = other.first; last = other.last; }
public AdapterChainLinkInterceptor(IInterceptor <TContext> real) { this.real = real; next = new LastChainLinkInterceptor <TContext>(); }