private void OnBillStacking(BillStackedEventArgs e) { if (BillStacking != null) { bool cancel = false; bool hold = false; foreach (BillStackingHandler subscriber in BillStacking.GetInvocationList()) { subscriber(this, e); if (e.Hold) { hold = true; break; } if (e.Cancel) { cancel = true; break; } } _holdBill = hold; _ReturnBill = cancel; } }
private void OnBillStacking(BillStackedEventArgs e) { if (BillStacking == null) { return; } foreach (BillStackingHandler subscriber in BillStacking.GetInvocationList()) { subscriber(this, e).GetAwaiter().GetResult(); if (e.HasToRejectBill) { _returnBill = true; return; } } _returnBill = false; }