public Task <ApiResponse <TReturn> > ExecuteWithReturn <TCommand, TReturn>( CommandWithReturnExecutionContext <TConnection, TCommand, TReturn> context ) where TCommand : ICommand <TReturn> { var pipeline = ExecuteWithReturnCache <TCommand, TReturn> .GetPipeline(_steps, context.Command.GetType()); return(pipeline(context)); }
public Task <ApiResponse <TReturn> > ExecuteWithReturn <TConnection, TCommand, TReturn>( Func <CommandWithReturnExecutionContext <TConnection, TCommand, TReturn>, Task <ApiResponse <TReturn> > > next, CommandWithReturnExecutionContext <TConnection, TCommand, TReturn> context ) where TConnection : IHattemConnection where TCommand : ICommand <TReturn> { CommandWithReturnCapturedContextStorage <TConnection, TCommand, TReturn> .CapturedContext.Add(context); return(next(context)); }