Exemple #1
0
        internal static void Simulate()
        {
            var log = Log.Logger.ForContext("Source", nameof(OverCooking));

            log.Information("Building Kitchen");
            Kitchen kitchen = new Kitchen(3);

            kitchen.Start();

            for (int i = 0; i < 5; i++)
            {
                kitchen.Order();
            }
        }
Exemple #2
0
 internal Waiter(Kitchen kitchen) : base(kitchen.DishesWithFood, kitchen.DirtyDishes)
 {
     this.Logger = Log.Logger.ForContext("Source", nameof(Waiter)).ForContext("Id", this.Id);
 }
Exemple #3
0
 internal Cleaner(Kitchen kitchen) : base(kitchen.DirtyDishes, null)
 {
     this.Logger = Log.Logger.ForContext("Source", nameof(Cleaner)).ForContext("Id", this.Id);
 }
Exemple #4
0
 internal Chef(Kitchen kitchen) : base(kitchen.EmptyDishes, kitchen.DishesWithFood)
 {
     this.Logger = Log.Logger.ForContext("Source", nameof(Chef)).ForContext("Id", this.Id);
 }