Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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));
        }