示例#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));
        }
示例#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);
        }
示例#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);
        }
示例#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;
 }
示例#6
0
 public RecipeSummaryViewModel(IViewModelRepository repository)
 {
     _viewModelRepository = repository ?? throw new ArgumentNullException(nameof(repository));
 }
示例#7
0
 public MapExerciseWorkoutController(
     IViewModelRepository <int, MapExerciseWorkoutViewModel, MapExerciseWorkoutOfmForPost, MapExerciseWorkoutOfmResourceParameters, MapExerciseWorkoutOfmCollectionResourceParameters> mapExerciseWorkoutViewModelRepository)
 {
     _mapExerciseWorkoutViewModelRepository = mapExerciseWorkoutViewModelRepository;
 }
示例#8
0
 public CardioSetController(
     IViewModelRepository <int, CardioSetViewModel, CardioSetOfmForPost, CardioSetOfmResourceParameters, CardioSetOfmCollectionResourceParameters> cardioSetViewModelRepository)
 {
     _cardioSetViewModelRepository = cardioSetViewModelRepository;
 }
示例#9
0
 public GetCartViewModelHandler(IViewModelRepository repository, IChildMediatorFactory mediator)
     : base(repository, mediator)
 {
 }
示例#10
0
 public GetHomepageCataglogViewModelHandler(IViewModelRepository repository, IChildMediatorFactory mediator)
     : base(repository, mediator)
 {
 }
 public NewsletterController(IViewModelRepository repository)
 {
     Repository = repository;
 }
示例#12
0
 public ViewTypeSelector(IViewModelRepository viewModelRepository)
 {
     _viewModelRepository = viewModelRepository ?? throw new ArgumentNullException(nameof(viewModelRepository));
 }
示例#13
0
 public AddIngredientViewModel(IViewModelRepository viewmodelRepository)
 {
     _viewModelRepository           = viewmodelRepository ?? throw new ArgumentNullException(nameof(viewmodelRepository));
     IngredientTypeSelectionManager = new ViewModelManager <SelectionViewModel <IngredientType> >(CreateIngredientTypeSelectionViewModel());
 }
示例#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;
 }
 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;
 }
示例#19
0
 public SelectionViewModel(IViewModelRepository viewModelRepository)
 {
     ViewModelRepository = viewModelRepository ?? throw new ArgumentNullException(nameof(viewModelRepository));
 }
示例#20
0
 public CategoryController(
     IViewModelRepository <int, CategoryViewModel, CategoryOfmForPost, CategoryOfmResourceParameters, CategoryOfmCollectionResourceParameters> categoryViewModelRepository)
 {
     _categoryViewModelRepository = categoryViewModelRepository;
 }
示例#21
0
 public CreateNewSessionViewModelHandler(IViewModelRepository repository, IChildMediatorFactory mediator)
     : base(mediator)
 {
     _repository = repository;
 }