public IOperationPipelineBuilder <T> Use(OperationMiddleware <T> middleware) { if (middleware is null) { throw new ArgumentNullException(nameof(middleware)); } _components.Push(middleware); return(this); }
public OperationDelegate Build(IServiceProvider services) { if (services is null) { throw new ArgumentNullException(nameof(services)); } if (_components.Count == 0) { throw new InvalidOperationException( "There has to be at least one operation middleware."); } OperationDelegate next = ThrowExceptionMiddleware; while (_components.Count > 0) { OperationMiddleware middleware = _components.Pop(); next = middleware.Invoke(services, next); } return(next); }
public IHttpOperationExecutorBuilder Use(OperationMiddleware middleware) { throw new NotImplementedException(); }