public MainViewModel(ISessionStateManager sessionStateManager, IViewModelRepository viewModelRepository)
        {
            Debug.WriteLine("MainViewModel created");
            AccessKey = "Mijn access key";

            _sessionStateManager = sessionStateManager ?? throw new ArgumentNullException(nameof(sessionStateManager));
            _viewModelRepository = viewModelRepository ?? throw new ArgumentNullException(nameof(viewModelRepository));
        }
        public RecipeViewModel(ISessionStateManager sessionStateManager, IViewModelRepository viewModelRepository, ICommandFactory commandFactory)
        {
            _sessionStateManager = sessionStateManager ?? throw new ArgumentNullException(nameof(sessionStateManager));
            _viewModelRepository = viewModelRepository ?? throw new ArgumentNullException(nameof(viewModelRepository));
            _commandFactory      = commandFactory ?? throw new ArgumentNullException(nameof(commandFactory));

            RetrieveIngredientsCommand = _commandFactory.CreateCommand(this, RetrieveIngredients);
            RemoveIngredientsCommand   = _commandFactory.CreateCommand(this, RemoveIngredients);
            AddIngredientCommand       = _commandFactory.CreateCommand(this, AddIngredient);
        }
Exemple #3
0
 public WorkoutController(
     IViewModelRepository <int, WorkoutViewModel, WorkoutOfmForPost, WorkoutOfmResourceParameters, WorkoutOfmCollectionResourceParameters> workoutViewModelRepository,
     IViewModelRepository <int, MapExerciseWorkoutViewModel, MapExerciseWorkoutOfmForPost, MapExerciseWorkoutOfmResourceParameters, MapExerciseWorkoutOfmCollectionResourceParameters> mapExericseWorkoutViewModelRepository,
     IViewModelRepository <int, WorkoutHistoryViewModel, WorkoutHistoryOfmForPost, WorkoutHistoryOfmResourceParameters, WorkoutHistoryOfmCollectionResourceParameters> workoutHistoryViewModelRepository,
     IViewModelRepository <int, WeightLiftingSetViewModel, WeightLiftingSetOfmForPost, WeightLiftingSetOfmResourceParameters, WeightLiftingSetOfmCollectionResourceParameters> weightLiftingSetViewModelRepository)
 {
     _workoutViewModelRepository            = workoutViewModelRepository;
     _mapExericseWorkoutViewModelRepository = mapExericseWorkoutViewModelRepository;
     _workoutHistoryViewModelRepository     = workoutHistoryViewModelRepository;
     _weightLiftingSetViewModelRepository   = weightLiftingSetViewModelRepository;
 }
        public RegisterRecipeViewModel(IViewModelRepository viewModelRepository, ISessionStateManager sessionStateManager, ICommandFactory commandFactory)
        {
            _viewModelRepository = viewModelRepository ?? throw new ArgumentNullException(nameof(viewModelRepository));
            _sessionStateManager = sessionStateManager ?? throw new ArgumentNullException(nameof(sessionStateManager));
            _commandFactory      = commandFactory ?? throw new ArgumentNullException(nameof(commandFactory));

            SeasonSelectionModelManager    = new ViewModelManager <SelectionViewModel <Season> >(CreateSeasonSelectionViewModel());
            IngredientTypeSelectionManager = new ViewModelManager <SelectionViewModel <IngredientCharacteristics> >(CreateIngredientCharacteristicSelectionViewModel());

            RegisterRecipeCommand = _commandFactory.CreateCommand(this, RegisterRecipe);
        }
Exemple #5
0
 public WorkoutViewModelRepository(
     ////IConfiguration appConfiguration,
     ////IHttpContextAccessor httpContextAccessor,
     ////IHttpRequestExecuter httpRequestExecuter,
     IApiModelRepository <int, WorkoutOfmForGet, WorkoutOfmForPost, WorkoutOfmCollectionResourceParameters> workoutApiModelRepository,
     IViewModelRepository <int, ExerciseViewModel, ExerciseOfmForPost, ExerciseOfmResourceParameters, ExerciseOfmCollectionResourceParameters> exerciseViewModelRepository)
     : base(
         ////appConfiguration,
         ////httpContextAccessor,
         ////"Workout",
         ////httpRequestExecuter,
         workoutApiModelRepository)
 {
     _exerciseViewModelRepository = exerciseViewModelRepository;
 }
Exemple #6
0
 public RecipeSummaryViewModel(IViewModelRepository repository)
 {
     _viewModelRepository = repository ?? throw new ArgumentNullException(nameof(repository));
 }
Exemple #7
0
 public MapExerciseWorkoutController(
     IViewModelRepository <int, MapExerciseWorkoutViewModel, MapExerciseWorkoutOfmForPost, MapExerciseWorkoutOfmResourceParameters, MapExerciseWorkoutOfmCollectionResourceParameters> mapExerciseWorkoutViewModelRepository)
 {
     _mapExerciseWorkoutViewModelRepository = mapExerciseWorkoutViewModelRepository;
 }
Exemple #8
0
 public CardioSetController(
     IViewModelRepository <int, CardioSetViewModel, CardioSetOfmForPost, CardioSetOfmResourceParameters, CardioSetOfmCollectionResourceParameters> cardioSetViewModelRepository)
 {
     _cardioSetViewModelRepository = cardioSetViewModelRepository;
 }
Exemple #9
0
 public GetCartViewModelHandler(IViewModelRepository repository, IChildMediatorFactory mediator)
     : base(repository, mediator)
 {
 }
Exemple #10
0
 public GetHomepageCataglogViewModelHandler(IViewModelRepository repository, IChildMediatorFactory mediator)
     : base(repository, mediator)
 {
 }
 public NewsletterController(IViewModelRepository repository)
 {
     Repository = repository;
 }
Exemple #12
0
 public ViewTypeSelector(IViewModelRepository viewModelRepository)
 {
     _viewModelRepository = viewModelRepository ?? throw new ArgumentNullException(nameof(viewModelRepository));
 }
Exemple #13
0
 public AddIngredientViewModel(IViewModelRepository viewmodelRepository)
 {
     _viewModelRepository           = viewmodelRepository ?? throw new ArgumentNullException(nameof(viewmodelRepository));
     IngredientTypeSelectionManager = new ViewModelManager <SelectionViewModel <IngredientType> >(CreateIngredientTypeSelectionViewModel());
 }
 public NavMenuViewModel(IViewModelRepository viewModelRepository)
 {
     _viewModelRepository = viewModelRepository ?? throw new ArgumentNullException(nameof(viewModelRepository));;
 }
 public UpdateCartViewModelHandler(IRepository <ProductCatalogRoot> repository, IViewModelRepository viewModelRepository,
                                   IChildMediatorFactory mediator) : base(mediator)
 {
     _repository          = repository;
     _viewModelRepository = viewModelRepository;
 }
 public ExerciseHistoryController(
     IViewModelRepository <int, ExerciseHistoryViewModel, ExerciseHistoryOfmForPost, ExerciseHistoryOfmResourceParameters, ExerciseHistoryOfmCollectionResourceParameters> exerciseHistoryViewModelRepository)
 {
     _exerciseHistoryViewModelRepository = exerciseHistoryViewModelRepository;
 }
 public WeightLiftingSetController(
     IViewModelRepository <int, WeightLiftingSetViewModel, WeightLiftingSetOfmForPost, WeightLiftingSetOfmResourceParameters, WeightLiftingSetOfmCollectionResourceParameters> weightLiftingSetViewModelRepository)
 {
     _weightLiftingSetViewModelRepository = weightLiftingSetViewModelRepository;
 }
 protected ViewModelQueryBase(IViewModelRepository repository, IChildMediatorFactory mediator) : base(mediator)
 {
     _repository = repository;
 }
 public SelectionViewModel(IViewModelRepository viewModelRepository)
 {
     ViewModelRepository = viewModelRepository ?? throw new ArgumentNullException(nameof(viewModelRepository));
 }
Exemple #20
0
 public CategoryController(
     IViewModelRepository <int, CategoryViewModel, CategoryOfmForPost, CategoryOfmResourceParameters, CategoryOfmCollectionResourceParameters> categoryViewModelRepository)
 {
     _categoryViewModelRepository = categoryViewModelRepository;
 }
Exemple #21
0
 public CreateNewSessionViewModelHandler(IViewModelRepository repository, IChildMediatorFactory mediator)
     : base(mediator)
 {
     _repository = repository;
 }