private void placePayment(IEnumerable <Service> services) { Console.WriteLine(this.GetType() + "_" + this.GetHashCode() + ": " + System.Reflection.MethodBase.GetCurrentMethod().Name + "()"); try { paymentDevice.pay(new Payment(services, "By cash")); foreach (Service service in services) { runDevice(service.deviceId, service); } } catch (Exception) { } }
public virtual void pay(Payment payment) { Console.WriteLine(this.GetType() + "_" + this.GetHashCode() + ": " + System.Reflection.MethodBase.GetCurrentMethod().Name + "()"); log(payment); terminal.pay(payment); }