Пример #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();
            }
        }
Пример #2
0
 internal Waiter(Kitchen kitchen) : base(kitchen.DishesWithFood, kitchen.DirtyDishes)
 {
     this.Logger = Log.Logger.ForContext("Source", nameof(Waiter)).ForContext("Id", this.Id);
 }
Пример #3
0
 internal Cleaner(Kitchen kitchen) : base(kitchen.DirtyDishes, null)
 {
     this.Logger = Log.Logger.ForContext("Source", nameof(Cleaner)).ForContext("Id", this.Id);
 }
Пример #4
0
 internal Chef(Kitchen kitchen) : base(kitchen.EmptyDishes, kitchen.DishesWithFood)
 {
     this.Logger = Log.Logger.ForContext("Source", nameof(Chef)).ForContext("Id", this.Id);
 }