示例#1
0
 public Suggestion(IRecipeFactory recipeFactory, IIngredientFactory ingredientFactory)
 {
     this.recipeFactory = recipeFactory ??
                          throw new System.ArgumentNullException(nameof(recipeFactory));
     this.ingredientFactory = ingredientFactory ??
                              throw new System.ArgumentNullException(nameof(ingredientFactory));
 }
示例#2
0
 public CreateRecipeCommandHandler(
     IRecipeRepository recipeRepository,
     IRecipeFactory recipeFactory)
 {
     RecipeRepository = recipeRepository;
     RecipeFactory    = recipeFactory;
 }
 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 HeroManager(IHeroFactory heroFactory, IItemFactory itemFactory, IRecipeFactory recipeFactory)
    {
        this.heroFactory   = heroFactory;
        this.itemFactory   = itemFactory;
        this.recipeFactory = recipeFactory;

        this.heroes = new Dictionary <string, IHero>();
    }
 public CommandInterpreter(
     IHeroRepository heroRepository,
     IHeroFactory heroFactory,
     IItemFactory itemFactory,
     IRecipeFactory recipeFactory)
 {
     this.heroRepository = heroRepository;
     this.heroFactory    = heroFactory;
     this.itemFactory    = itemFactory;
     this.recipeFactory  = recipeFactory;
 }
示例#7
0
 public CreateRecipeCommandHandler(
     IEnumerable <ICommandValidator <CreateRecipeCommand> > validators,
     IEventPublisher eventPublisher,
     IRecipeFactory recipeFactory,
     IRecipeIngredientFactory recipeIngredientFactory,
     IImageUploader imageUploader)
 {
     _validators              = validators;
     _eventPublisher          = eventPublisher;
     _recipeFactory           = recipeFactory;
     _recipeIngredientFactory = recipeIngredientFactory;
     _imageUploader           = imageUploader;
 }
示例#8
0
 public Engine(
     IInputReader reader,
     IOutputWriter writer,
     IManager manager,
     IHeroFactory heroFactory,
     ICommonItemFactory commonItemFactory,
     IRecipeFactory recipeFactory)
 {
     this.reader            = reader;
     this.writer            = writer;
     this.heroManager       = manager;
     this.heroFactory       = heroFactory;
     this.commonItemFactory = commonItemFactory;
     this.recipeFactory     = recipeFactory;
 }