public void GeefBestellingIn(BestelEventArgs args) { /* * if (BestellingEvent != null) * BestellingEvent(this, args); */ BestellingEvent?.Invoke(this, args); }
public void BestellingOntvangen(object sender, BestelEventArgs args) { if (args == null || string.IsNullOrEmpty(args.Product)) { return; // preconditie } System.Console.WriteLine(args.Product + " in voorbereiding"); System.Threading.Thread.Sleep(5000); Bel.Ring(args); }
private void BelGehoord(object sender, BestelEventArgs args) { var klant = this._klanten.Where(k => k.Naam == args.Klant).FirstOrDefault(); if (klant == null) { return; } klant.Betaal(args.Product); klant.Consumeer(args.Product); }
public void BestellingOntvangen(object sender, BestelEventArgs args) { if (args == null || string.IsNullOrWhiteSpace(args.Product)) { return; } Console.WriteLine($"{args.Product} in voorbereiding..."); System.Threading.Thread.Sleep(5000); Bel.Ring(args); }
public void Ring(BestelEventArgs args) { RingEvent?.Invoke(this, args); }
public void GeefBestellingIn(BestelEventArgs args) { BestellingEvent?.Invoke(this, args); }