Esempio n. 1
0
        public IngredientListViewModel(IngredientsFacade ingredientsFacade,
                                       ICommandFactory commandFactory,
                                       INavigationService navigationService)
        {
            this.ingredientsFacade = ingredientsFacade;
            this.navigationService = navigationService;

            NavigateToDetailCommand = commandFactory.CreateCommand <Guid>(NavigateToDetail);
            NavigateToAddCommand    = commandFactory.CreateCommand(NavigateToAdd);
        }
Esempio n. 2
0
 public IngredientEditViewModel(Guid?viewModelParameter,
                                IngredientsFacade ingredientsFacade,
                                ICommandFactory commandFactory,
                                INavigationService navigationService)
     : base(viewModelParameter)
 {
     this.ingredientsFacade = ingredientsFacade;
     this.navigationService = navigationService;
     CancelCommand          = commandFactory.CreateCommand(Cancel);
     SaveCommand            = commandFactory.CreateCommand(Save);
 }
Esempio n. 3
0
        public IngredientDetailViewModel(Guid viewModelParameter,
                                         IngredientsFacade ingredientsFacade,
                                         ICommandFactory commandFactory,
                                         INavigationService navigationService)
            : base(viewModelParameter)
        {
            this.ingredientsFacade = ingredientsFacade;
            this.navigationService = navigationService;

            DeleteCommand         = commandFactory.CreateCommand(Delete);
            NavigateToEditCommand = commandFactory.CreateCommand(NavigateToEdit);
        }
Esempio n. 4
0
        public RecipeEditViewModel(Guid?viewModelParameter,
                                   RecipesFacade recipesFacade,
                                   IngredientsFacade ingredientsFacade,
                                   ICommandFactory commandFactory,
                                   INavigationService navigationService)
            : base(viewModelParameter)
        {
            this.recipesFacade     = recipesFacade;
            this.ingredientsFacade = ingredientsFacade;
            this.navigationService = navigationService;

            AddIngredientCommand    = commandFactory.CreateCommand(AddIngredient);
            RemoveIngredientCommand = commandFactory.CreateCommand <Guid>(RemoveIngredient);
            SaveCommand             = commandFactory.CreateCommand(Save);
            CancelCommand           = commandFactory.CreateCommand(Cancel);
        }