public Task <string> ProcessCommand(CreateOrderFlowContext context, IFlowCommand command) { return(command switch { SubmitPaymentDetailsCommand submitCommand => DoProcessing(context, submitCommand), GoToContactDetailsCommand goToContactCommand => DoProcessing(context, goToContactCommand), _ => throw new UnsupportedCommandException(), });
public Task <string> ProcessCommand(CreateOrderFlowContext context, IFlowCommand command) { return(command switch { GoToProductSelectionCommand goToProductSelectionCommand => DoProcessing(context, goToProductSelectionCommand), SubmitProductSelectionCommand submitCommand => DoProcessing(context, submitCommand), _ => throw new UnsupportedCommandException(), });