Пример #1
0
 public UserManager(IDataBaseManager DbManager, ILogger logger, ISessionStateManager sessionManager, IMapper mapper)
 {
     _sessionManager = sessionManager;
     _dbManager      = DbManager;
     _logger         = logger;
     _mapper         = mapper;
 }
Пример #2
0
        public RegisterOrganisationViewModel(ISessionStateManager sessionStateManager, ICommandFactory commandFactory)
        {
            _sessionStateManager = sessionStateManager ?? throw new ArgumentNullException(nameof(_sessionStateManager));
            _commandFactory      = commandFactory ?? throw new ArgumentNullException(nameof(commandFactory));

            RegisterCommand = _commandFactory.CreateCommand(this, RegisterOrganisation);
        }
Пример #3
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));
        }
        public ProvideAccessKeyViewModel(ISessionStateManager sessionStateManager)
        {
            _sessionStateManager = sessionStateManager ?? throw new ArgumentNullException(nameof(sessionStateManager));
            LoginCommand         = new BusyCommand(this, CheckAccessKey);
            LogoutCommand        = new BusyCommand(this, RemoveAccessKey);

            // Some preconfigured access key for testing
            AccessKey = PreconfiguredAccessKey;
        }
Пример #5
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);
        }
        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);
        }