Пример #1
0
 public RestaurantService(ITaisKohtUnitOfWork uow, IRestaurantFactory restaurantFactory, IUserFactory userFactory, UserManager <User> userManager)
 {
     _uow = uow;
     _restaurantFactory = restaurantFactory;
     _userFactory       = userFactory;
     _userManager       = userManager;
 }
Пример #2
0
 public AddRestaurantCommandHandler(IRestaurantFactory restaurantFactory, IRestaurantRepository restaurantRepository, IPaymentMethodRepository paymentMethodRepository, IUserRepository userRepository)
 {
     this.restaurantFactory       = restaurantFactory;
     this.restaurantRepository    = restaurantRepository;
     this.paymentMethodRepository = paymentMethodRepository;
     this.userRepository          = userRepository;
 }
 private RestaurantManagerEngine()
 {
     this.restaurantFactory = new RestaurantFactory();
     this.recipeFactory = new RecipeFactory();
     this.restaurants = new Dictionary<string, IRestaurant>();
     this.recipes = new Dictionary<string, IRecipe>();
     this.userInterface = new ConsoleInterface();
 }
Пример #4
0
 private RestaurantManagerEngine()
 {
     this.restaurantFactory = new RestaurantFactory();
     this.recipeFactory     = new RecipeFactory();
     this.restaurants       = new Dictionary <string, IRestaurant>();
     this.recipes           = new Dictionary <string, IRecipe>();
     this.userInterface     = new ConsoleInterface();
 }
Пример #5
0
        public override void Execute()
        {
            IRestaurantFactory factory = LoadFactory();

            IAppetizer appetizer = factory.PrepareAppetizer();

            appetizer.ShowDescription();

            IMainCourse mainCourse = factory.PrepareMainCourse();

            mainCourse.ShowDescription();

            IDessert dessert = factory.PrepareDessert();

            dessert.ShowDescription();
            dessert.ShowSugarAmount();
        }