Beispiel #1
0
        public async Task <TResult> Execute <TResult>(ICommandParams <TResult> paramModel)
        {
            ICommandResolver resolver = GetCommandResolver(paramModel.GetType());
            var wrapper = GetWrapper <TResult>(typeof(TResult), paramModel.GetType(), resolver);

            return(await wrapper.Execute(paramModel));
        }
Beispiel #2
0
 public PipelineAction RunPostCommand(TStage stage, ICommandParams <TPayload> callContext)
 {
     if (_postCommand != null)
     {
         return(_postCommand(stage, callContext));
     }
     return(PipelineAction.Continue);
 }
Beispiel #3
0
 public StageCallContext(string commandName, ICommandParams <TPayload> commandParams, int maxStageIndex, IDictionary <string, IStageCommand <TPayload> > customStageCommands = null)
 {
     CommandName             = commandName;
     CommandParams           = commandParams;
     MaxStageIndex           = maxStageIndex;
     MostRecentCommandAction = PipelineAction.Continue;
     CustomStageCommands     = customStageCommands ?? new Dictionary <string, IStageCommand <TPayload> >();
 }
Beispiel #4
0
 public PipelineAction RunPostCommand(ICommandParams <TPayload> callContext)
 {
     return(_commandDefinition.RunPostCommand(_stage, callContext));
 }
Beispiel #5
0
 public Task <string> Execute(ICommandParams <string> parameterModel)
 {
     return(Task.FromResult("test resolved successfully"));
 }
Beispiel #6
0
 internal abstract Task <TResult> Execute(ICommandParams <TResult> request);
Beispiel #7
0
            internal override async Task <TResult> Execute(ICommandParams <TResult> parameterModel)
            {
                ICommand <TCommandParams, TResult> command = _resolver.ResolveCommandImplementation <TCommandParams, TResult>();

                return(await command.Execute(parameterModel));
            }
Beispiel #8
0
 public PipelineAction RunPostCommand(ICommandParams <TPayload> callContext)
 {
     return(PipelineAction.Continue);
 }