コード例 #1
0
        public async Task InvokeAsync(ConsoleRequestContext context, RequestDelegate next)
        {
            CommandSeed commandSeed = commandPool.GetMatchingCommand(context.Arguments);

            ICommandModel commandModel = commandSeed.CreateModel(commandModelFactory);
            object        commandView  = commandSeed.CreateView(commandViewFactory);

            bool isLongCommandView = IsLongCommandView(commandView);

            if (isLongCommandView)
            {
                await ExecuteLongCommand(commandModel, commandView, context);
            }
            else
            {
                await ExecuteCommand(commandModel, commandView, context);
            }

            if (next != null)
            {
                await next.Invoke(context);
            }
        }
コード例 #2
0
 public FakeDeleteCommandBuilder(IFixture fixture, CommandSeed <FakeDeleteCommand> seed)
     : base(fixture, seed)
 {
 }
コード例 #3
0
 public FakeDispatcherCommandBuilder(IFixture fixture, CommandSeed <FakeDispatcherCommand> seed)
     : base(fixture, seed)
 {
 }
コード例 #4
0
 public FakeDeleteCommand FakeDeleteCommand(CommandSeed <FakeDeleteCommand> seed)
 {
     return(Fixtures.CommandFromBuilder(f => new FakeDeleteCommandBuilder(f, seed)));
 }