public Task <string> ProcessCommand(CreateOrderFlowContext context, IFlowCommand command)
        {
            return(command switch
            {
                SubmitPaymentDetailsCommand submitCommand => DoProcessing(context, submitCommand),
                GoToContactDetailsCommand goToContactCommand => DoProcessing(context, goToContactCommand),

                _ => throw new UnsupportedCommandException(),
            });
示例#2
0
        public Task <string> ProcessCommand(CreateOrderFlowContext context, IFlowCommand command)
        {
            return(command switch
            {
                GoToProductSelectionCommand goToProductSelectionCommand => DoProcessing(context, goToProductSelectionCommand),
                SubmitProductSelectionCommand submitCommand => DoProcessing(context, submitCommand),

                _ => throw new UnsupportedCommandException(),
            });