public MediatorBuilder Return <Response, Handler>(Func <Handler, Request, Task <Response> > action)
        {
            var sendPipeline = new DirectAsync <Request, Response, Handler>(action);

            _direct = sendPipeline;
            return(_pipelinesManager);
        }
 public IMediatorBuilder Return <TResult, THandler>(Func <THandler, TRequest, Task <TResult> > func)
 {
     _direct = new DirectAsync <TRequest, TResult, THandler>(func);
     return(_mediatorBuilder);
 }
 public AsyncPipeline(IMediatorBuilder mediatorBuilder)
 {
     _mediatorBuilder = mediatorBuilder;
     _methods         = new MethodCollection <Method <Func <object, object, Task> > > ();
     _direct          = null !;
 }
 public AsyncPipeline(MediatorBuilder pipelinesManager)
 {
     _pipelinesManager = pipelinesManager;
     _methods          = new MethodCollection <Method <Func <object, Request, Task>, Request>, Request> ();
     _direct           = null !;
 }
 public IAsyncPipeline Return <TResult, THandler>(Func <THandler, TRequest, Task <TResult> > func)
 {
     _direct = new DirectAsync <TRequest, TResult, THandler>(func);
     return(Build());
 }
 public AsyncPipelineBuilder()
 {
     _methods = new MethodCollection <Method <Func <object, object, Task> > >();
     _direct  = null !;
 }
 public AsyncPipeline(IMethodCollection <Method <Func <object, object, Task> > > methods, IDirectAsync direct, Type requestType)
 {
     _methods     = methods;
     _direct      = direct;
     _requestType = requestType;
 }