Exemple #1
0
 public void Close()
 {
     OrderValidator.ThatMembers()
     .ValidateAtLeastOneSelection(Dishes.Count)
     .ValidateDishesCount(Dishes, TimeOfDay)
     .Guard();
 }
Exemple #2
0
        public Order(TimeOfDay timeOfDay)
        {
            OrderValidator.ThatMembers()
            .ValidateTimeOfDay(timeOfDay)
            .Guard();

            TimeOfDay = timeOfDay;
            Dishes    = new List <Dish>();
        }