public override int GetHashCode() { var hashCode = 1947966917; hashCode = hashCode * -1521134295 + DrinkType.GetHashCode(); hashCode = hashCode * -1521134295 + _sugarCount.GetHashCode(); hashCode = hashCode * -1521134295 + HasStick.GetHashCode(); hashCode = hashCode * -1521134295 + Message.GetHashCode(); return(hashCode); }
public static Drink MakeDrink(DrinkType type, DrinkFlavor flavor, DrinkSize size) { var delay = (flavor.GetHashCode() + size.GetHashCode() + (type.GetHashCode() * 2)) * 300; Thread.Sleep(delay); return(new Drink { Id = Guid.NewGuid(), Flavor = flavor, Size = size, Type = type }); }