예제 #1
0
        public bool MatchCategory(PricingCategoryRequested pricingCategoryRequested)
        {
            if (pricingCategoryRequested == PricingCategoryRequested.Mixed)
            {
                return(true);
            }

            return(PricingCategory == pricingCategoryRequested.ToPricingCategory());
        }
예제 #2
0
        public static List <SuggestionMade> BuildSuggestions(int party,
                                                             PricingCategoryRequested pricingCategoryRequested,
                                                             params string[] groupsOfSeats)
        {
            var result = new List <SuggestionMade>();

            foreach (var groupsOfSeat in groupsOfSeats)
            {
                var seats = groupsOfSeat.Split('-').Select(s =>
                                                           new Seat(pricingCategoryRequested.ToPricingCategory(), s, SeatAvailability.Available, 0)).ToList();

                result.Add(new SuggestionMade(new PartyRequested(party), pricingCategoryRequested, seats));
            }

            return(result);
        }