private string FormatSingleDish(MealRequest request, DishRequestItem item) { var dishes = AvailableMeals[request.MealRequestType].Dishes; var allowed = AvailableMeals[request.MealRequestType].AllowedMultiple; return DecodeDish(item.Offset, dishes) + DishSuffix(allowed, item); }
private string DishSuffix(int[] allowedMultiple, DishRequestItem item) { return item.Count == 1 ? "" : allowedMultiple.Contains(item.Item) ? string.Format("(x{0})", item.Count) : ", error"; }