public Task Process(string method, decimal amount) { var tEvent = new PaymentCreatedEvent(); switch (method) { case "Cash": BasePayment cashPayment = new CashPayment(); cashPayment.Execute(tEvent); break; case "Credit": BasePayment creditPayment = new CreditPayment(); creditPayment.Execute(tEvent); break; } return(Task.CompletedTask); }