Esempio n. 1
0
 public override int GetHashCode() => BreadType.GetHashCode() ^
 CheeseType.GetHashCode() ^
 HasMayo.GetHashCode() ^
 HasMustard.GetHashCode() ^
 IsToasted.GetHashCode() ^
 MeatType.GetHashCode() ^
 Vegetables.GetHashCode();
Esempio n. 2
0
        public static Burger MakeBurger(CheeseType cheeseType, int cheeseQuantity, int meatQuantity)
        {
            var delay = ((cheeseType.GetHashCode() * cheeseQuantity) + meatQuantity) * 500;

            Thread.Sleep(delay);
            return(new Burger
            {
                Id = Guid.NewGuid(),
                Cheese = cheeseType,
                CheeseQuantity = cheeseQuantity,
                MeatQuantity = meatQuantity
            });
        }