Exemplo n.º 1
0
 public void GeefBestellingIn(BestelEventArgs args)
 {
     /*
      * if (BestellingEvent != null)
      *  BestellingEvent(this, args);
      */
     BestellingEvent?.Invoke(this, args);
 }
Exemplo n.º 2
0
 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);
 }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
 public void Ring(BestelEventArgs args)
 {
     RingEvent?.Invoke(this, args);
 }
 public void GeefBestellingIn(BestelEventArgs args)
 {
     BestellingEvent?.Invoke(this, args);
 }