public void SetNext(IPipeLineHandler <TContext> nextHandler) { if (nextHandler == null) { throw new ArgumentNullException(nameof(nextHandler), "Next handler cannot be null"); } if (nextHandler == this) { throw new ArgumentException("Next handler cannot be same handler", nameof(nextHandler)); } Next = nextHandler.ExecuteAsync; }
public IPipeLineBuilder <TContext> UseHandler(IPipeLineHandler <TContext> handler) { if (handler == null) { throw new ArgumentNullException(nameof(handler), "Handler cannot be null"); } if (_handlers.Contains(handler)) { throw new ArgumentException("This handler already using", nameof(handler)); } _handlers.Add(handler); return(this); }
public void SetUp() { _handler = new FileSendHandler(_settings, _mailSender, _messageBuilder, _logger); }
public void SetUp() { _pipeLineHandler = Substitute.For <PipeLineHandler <object> >(); }
public void SetUp() { _handler = Substitute.For <CriticalAndCancelExceptionHandler>(_logger); }
public void SetUp() { _pipeLineHandler = Substitute.For <PipeLineHandler <object> >(); _builder = new PipeLineBuilder <object>(); }
public void SetUp() { _handler = new FileDeleteHandler(_logger); }