Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 6
0
 public RecipeSummaryViewModel(IViewModelRepository repository)
 {
     _viewModelRepository = repository ?? throw new ArgumentNullException(nameof(repository));
 }
Ejemplo n.º 7
0
 public MapExerciseWorkoutController(
     IViewModelRepository <int, MapExerciseWorkoutViewModel, MapExerciseWorkoutOfmForPost, MapExerciseWorkoutOfmResourceParameters, MapExerciseWorkoutOfmCollectionResourceParameters> mapExerciseWorkoutViewModelRepository)
 {
     _mapExerciseWorkoutViewModelRepository = mapExerciseWorkoutViewModelRepository;
 }
Ejemplo n.º 8
0
 public CardioSetController(
     IViewModelRepository <int, CardioSetViewModel, CardioSetOfmForPost, CardioSetOfmResourceParameters, CardioSetOfmCollectionResourceParameters> cardioSetViewModelRepository)
 {
     _cardioSetViewModelRepository = cardioSetViewModelRepository;
 }
Ejemplo n.º 9
0
 public GetCartViewModelHandler(IViewModelRepository repository, IChildMediatorFactory mediator)
     : base(repository, mediator)
 {
 }
Ejemplo n.º 10
0
 public GetHomepageCataglogViewModelHandler(IViewModelRepository repository, IChildMediatorFactory mediator)
     : base(repository, mediator)
 {
 }
 public NewsletterController(IViewModelRepository repository)
 {
     Repository = repository;
 }
Ejemplo n.º 12
0
 public ViewTypeSelector(IViewModelRepository viewModelRepository)
 {
     _viewModelRepository = viewModelRepository ?? throw new ArgumentNullException(nameof(viewModelRepository));
 }
Ejemplo n.º 13
0
 public AddIngredientViewModel(IViewModelRepository viewmodelRepository)
 {
     _viewModelRepository           = viewmodelRepository ?? throw new ArgumentNullException(nameof(viewmodelRepository));
     IngredientTypeSelectionManager = new ViewModelManager <SelectionViewModel <IngredientType> >(CreateIngredientTypeSelectionViewModel());
 }
Ejemplo n.º 14
0
 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;
 }
Ejemplo n.º 16
0
 public ExerciseHistoryController(
     IViewModelRepository <int, ExerciseHistoryViewModel, ExerciseHistoryOfmForPost, ExerciseHistoryOfmResourceParameters, ExerciseHistoryOfmCollectionResourceParameters> exerciseHistoryViewModelRepository)
 {
     _exerciseHistoryViewModelRepository = exerciseHistoryViewModelRepository;
 }
Ejemplo n.º 17
0
 public WeightLiftingSetController(
     IViewModelRepository <int, WeightLiftingSetViewModel, WeightLiftingSetOfmForPost, WeightLiftingSetOfmResourceParameters, WeightLiftingSetOfmCollectionResourceParameters> weightLiftingSetViewModelRepository)
 {
     _weightLiftingSetViewModelRepository = weightLiftingSetViewModelRepository;
 }
Ejemplo n.º 18
0
 protected ViewModelQueryBase(IViewModelRepository repository, IChildMediatorFactory mediator) : base(mediator)
 {
     _repository = repository;
 }
Ejemplo n.º 19
0
 public SelectionViewModel(IViewModelRepository viewModelRepository)
 {
     ViewModelRepository = viewModelRepository ?? throw new ArgumentNullException(nameof(viewModelRepository));
 }
Ejemplo n.º 20
0
 public CategoryController(
     IViewModelRepository <int, CategoryViewModel, CategoryOfmForPost, CategoryOfmResourceParameters, CategoryOfmCollectionResourceParameters> categoryViewModelRepository)
 {
     _categoryViewModelRepository = categoryViewModelRepository;
 }
Ejemplo n.º 21
0
 public CreateNewSessionViewModelHandler(IViewModelRepository repository, IChildMediatorFactory mediator)
     : base(mediator)
 {
     _repository = repository;
 }