public Task <string> ProcessCommand(CreateOrderFlowContext context, IFlowCommand command)
        {
            return(command switch
            {
                SubmitContactDetailsCommand submitCommand => DoProcessing(context, submitCommand),
                GoToProductSelectionCommand selectProductCommand => DoProcessing(context, selectProductCommand),

                _ => throw new UnsupportedCommandException(),
            });
Example #2
0
        public Task <ProductSelectionViewModel> GetProductListPage(CreateOrderFlowContext context, GoToProductSelectionCommand command)
        {
            var viewModel = new ProductSelectionViewModel
            {
                FlowContext = context,
                Product     = context.Product,
            };

            return(Task.FromResult(viewModel));
        }