public ProfileViewModelFactory([NotNull] ISystemDispatcher systemDispatcher,
                                       [NotNull] AsyncDataProvider dataProvider, [NotNull] StatisticsService statistics,
                                       [NotNull] IStringsProvider stringsProvider, [NotNull] INavigationService navigationService)
        {
            if (systemDispatcher == null)
            {
                throw new ArgumentNullException("systemDispatcher");
            }
            if (dataProvider == null)
            {
                throw new ArgumentNullException("dataProvider");
            }
            if (statistics == null)
            {
                throw new ArgumentNullException("statistics");
            }
            if (stringsProvider == null)
            {
                throw new ArgumentNullException("stringsProvider");
            }
            if (navigationService == null)
            {
                throw new ArgumentNullException("navigationService");
            }
            _systemDispatcher  = systemDispatcher;
            _dataProvider      = dataProvider;
            _statistics        = statistics;
            _stringsProvider   = stringsProvider;
            _navigationService = navigationService;


            _userViewModelFactory = new Lazy <IUserViewModelFactory>(
                () => new UserViewModelFactory(_systemDispatcher, _navigationService, _stringsProvider,
                                               _statistics));
        }
Example #2
0
 public UserViewModelFactory([NotNull] ISystemDispatcher dispatcher, [NotNull] INavigationService navigation,
                             [NotNull] IStringsProvider stringsProvider,
                             [NotNull] StatisticsService statistics)
 {
     if (dispatcher == null)
     {
         throw new ArgumentNullException("dispatcher");
     }
     if (navigation == null)
     {
         throw new ArgumentNullException("navigation");
     }
     if (stringsProvider == null)
     {
         throw new ArgumentNullException("stringsProvider");
     }
     if (statistics == null)
     {
         throw new ArgumentNullException("statistics");
     }
     _dispatcher      = dispatcher;
     _navigation      = navigation;
     _stringsProvider = stringsProvider;
     _statistics      = statistics;
 }
 public QuestionsViewModelFactory([NotNull] ISystemDispatcher systemDispatcher,
                                  [NotNull] StatisticsService statistics, [NotNull] AsyncDataProvider dataProvider,
                                  [NotNull] IStringsProvider stringsProvider, [NotNull] IPhoneTasks phoneTasks)
 {
     if (systemDispatcher == null)
     {
         throw new ArgumentNullException("systemDispatcher");
     }
     if (statistics == null)
     {
         throw new ArgumentNullException("statistics");
     }
     if (dataProvider == null)
     {
         throw new ArgumentNullException("dataProvider");
     }
     if (stringsProvider == null)
     {
         throw new ArgumentNullException("stringsProvider");
     }
     if (phoneTasks == null)
     {
         throw new ArgumentNullException("phoneTasks");
     }
     _systemDispatcher = systemDispatcher;
     _statistics       = statistics;
     _dataProvider     = dataProvider;
     _stringsProvider  = stringsProvider;
     _phoneTasks       = phoneTasks;
 }
 public UserActivityViewModel([NotNull] ISystemDispatcher dispatcher, [NotNull] StatisticsService statistics,
                              [NotNull] AsyncDataProvider dataProvider, [NotNull] IStringsProvider stringsProvider,
                              [NotNull] IPhoneTasks tasks, int userId,
                              DetailsType detailsType)
     : base(dispatcher)
 {
     if (statistics == null)
     {
         throw new ArgumentNullException("statistics");
     }
     if (dataProvider == null)
     {
         throw new ArgumentNullException("dataProvider");
     }
     if (stringsProvider == null)
     {
         throw new ArgumentNullException("stringsProvider");
     }
     if (tasks == null)
     {
         throw new ArgumentNullException("tasks");
     }
     _statistics      = statistics;
     _dataProvider    = dataProvider;
     _stringsProvider = stringsProvider;
     _tasks           = tasks;
     _userId          = userId;
     _detailsType     = detailsType;
     _statistics.PublishActivityPageLoaded(_detailsType == DetailsType.Questions);
     LoadMoreCommand = new RelayCommand(_ => LoadNext());
     LoadNext();
 }
Example #5
0
 public ShowsController(IMapper mapper, IShowsService showService, IStringsProvider strings, ILogger <ShowsController> logger)
 {
     _mapper      = mapper;
     _showService = showService;
     _strings     = strings;
     _logger      = logger;
 }
 public QuestionTypeViewModel(
     IStringsProvider stringsProvider, IQuestionTypeService questionTypeService,
     IEventAggregator eventAggregator)
     : base(stringsProvider)
 {
     _questionTypeService = questionTypeService;
     _eventAggregator     = eventAggregator;
 }
Example #7
0
        public PlayerViewModel(
            IStringsProvider stringsProvider, IGameService gameService)
            : base(stringsProvider)
        {
            _gameService = gameService;

            SelectCategoryCommand = new DelegateCommand <Category>(x => { var _ = MovePlayerAsync(x); });
        }
 public ShowsScraperHostedService(
     ILogger <ShowsScraperHostedService> logger,
     ITvMazeScraperService tvMazeScraperService,
     IStringsProvider strings)
 {
     _logger = logger;
     _tvMazeScraperService = tvMazeScraperService;
     _strings = strings;
 }
 public GameBoardViewModel(
     IStringsProvider stringsProvider, IGameService gameService, IUnityContainer unityContainer) : base(
         stringsProvider)
 {
     _gameService              = gameService;
     _unityContainer           = unityContainer;
     _gameService.GameChanged += OnGameChanged;
     ((INotifyCollectionChanged)_gameService.Players).CollectionChanged += (s, e) => RecalculatePlayerSize();
     RecalculatePlayerSize();
 }
Example #10
0
        public CategoryViewModel(
            IStringsProvider stringsProvider, ICategoryService categoryService, IEventAggregator eventAggregator)
            : base(stringsProvider)
        {
            _categoryService = categoryService;
            _eventAggregator = eventAggregator;

            ChangeImageCommand = new DelegateCommand(async() => await ChangeImageAsync());

            var _ = GetImageFromDbAsync();
        }
Example #11
0
 public DataViewModel(
     IStringsProvider stringsProvider,
     HamburgerMenuViewModel hamburgerMenuViewModel, QuestionsViewModel questionsViewModel,
     QuestionTypesViewModel questionTypesViewModel, CategoriesViewModel categoriesViewModel)
     : base(stringsProvider)
 {
     HamburgerMenuViewModel = hamburgerMenuViewModel;
     QuestionsViewModel     = questionsViewModel;
     QuestionTypesViewModel = questionTypesViewModel;
     CategoriesViewModel    = categoriesViewModel;
 }
 public ShowsService(
     IMapper mapper,
     ILogger <ShowsService> logger,
     IShowRepository showRepository,
     IStringsProvider strings)
 {
     _mapper         = mapper;
     _logger         = logger;
     _showRepository = showRepository;
     _strings        = strings;
 }
 public ShowsImportService(
     ILogger <ShowsImportService> logger,
     IStringsProvider strings,
     IMicroservicesCommunicationService communicationService,
     IShowsService showsService)
 {
     _logger  = logger;
     _strings = strings;
     _communicationService = communicationService;
     _showsService         = showsService;
 }
Example #14
0
 public MainWindowViewModel(
     IStringsProvider stringsProvider,
     HamburgerMenuViewModel hamburgerMenuViewModel, GameControlViewModel gameControlViewModel, DataViewModel dataViewModel,
     SettingsViewModel settingsViewModel)
     : base(stringsProvider)
 {
     HamburgerMenuViewModel = hamburgerMenuViewModel;
     GameControlViewModel   = gameControlViewModel;
     DataViewModel          = dataViewModel;
     SettingsViewModel      = settingsViewModel;
 }
Example #15
0
        public MicroservicesCommunicationHostedService(
            IServiceProvider serviceProvider,
            ILogger <MicroservicesCommunicationHostedService> logger,
            IStringsProvider strings)
        {
            _logger  = logger;
            _strings = strings;

            var serviceScope = serviceProvider.CreateScope();

            _showsImportService = serviceScope.ServiceProvider.GetService <IShowsImportService>();
        }
        public GameControlViewModel(
            IStringsProvider stringsProvider, HamburgerMenuViewModel hamburgerMenuViewModel,
            GameBoardViewModel gameBoardViewModel, QuestionViewModel questionViewModel, IGameService gameService,
            PlayersViewModel playersViewModel, IEventAggregator eventAggregator)
            : base(stringsProvider)
        {
            _eventAggregator = eventAggregator;

            GameService = gameService;
            GameService.Categories.Sync <Category, Category>(Categories, x => x, (x, y) => x.Id == y.Id);
            GameService.GameFinished += OnGameFinishedAsync;
            GameService.GameChanged  += OnGameChanged;

            PlayersViewModel                    = playersViewModel;
            HamburgerMenuViewModel              = hamburgerMenuViewModel;
            GameBoardViewModel                  = gameBoardViewModel;
            QuestionViewModel                   = questionViewModel;
            QuestionViewModel.QuestionAnswered += OnQuestionAnswered;

            CreateGameCommand = new DelegateCommand <double?>(x =>
            {
                var gameTime = x != null
                    ? (int)x
                    : 0;
                if (gameTime > 0)
                {
                    var _ = CreateGameAsync(gameTime);
                }
            });

            StartCommand = new DelegateCommand(() =>
            {
                var _ = StartAsync();
            });
            StopCommand = new DelegateCommand(() =>
            {
                var _ = StopAsync();
            });
            RestartCommand = new DelegateCommand(() =>
            {
                var _ = RestartAsync();
            });

            MovePlayerToCommand = new DelegateCommand <Category>(x =>
            {
                var _ = MovePlayerToAsync(x);
            });

            StartTimerCommand = new DelegateCommand(StartTimer);
            StopTimerCommand  = new DelegateCommand(StopTimer);
        }
 public TvMazeScraperService(
     IOptions <CommunicationConfig> appConfig,
     ILogger <TvMazeScraperService> logger,
     IMapper mapper,
     ITvMazeApiService tvMazeApiService,
     IImportInfoRepository importInfoRepository,
     IImportRequestRepository importRequestRepository,
     IStringsProvider strings,
     IMicroservicesCommunicationService communicationService)
 {
     _config                  = appConfig.Value;
     _logger                  = logger;
     _mapper                  = mapper;
     _tvMazeApiService        = tvMazeApiService;
     _importInfoRepository    = importInfoRepository;
     _importRequestRepository = importRequestRepository;
     _strings                 = strings;
     _communicationService    = communicationService;
 }
Example #18
0
 public UserViewModel([NotNull] ISystemDispatcher dispatcher, [NotNull] User model,
                      [NotNull] IStringsProvider stringsProvider, [NotNull] INavigationService navigation)
     : base(dispatcher)
 {
     if (model == null)
     {
         throw new ArgumentNullException("model");
     }
     if (stringsProvider == null)
     {
         throw new ArgumentNullException("stringsProvider");
     }
     if (navigation == null)
     {
         throw new ArgumentNullException("navigation");
     }
     _model           = model;
     _stringsProvider = stringsProvider;
     _navigation      = navigation;
     UserPic          = _model.EmailHash;
     InitCommand();
 }
Example #19
0
 public AViewModelBase(IStringsProvider stringsProvider)
 {
     Strings = stringsProvider.Strings;
 }
Example #20
0
 public AnswerViewModel(IStringsProvider stringsProvider, IFileService fileService)
     : base(stringsProvider)
 {
     _fileService    = fileService;
     PickFileCommand = new DelegateCommand(async() => await PickFileAsync());
 }
Example #21
0
 public ShowRepository(DatabaseContext database, IStringsProvider strings)
 {
     _database = database;
     _strings  = strings;
 }
Example #22
0
 public Step1Model(IStringsProvider stringsProvider)
 {
     this.StringsProvider = stringsProvider;
 }
Example #23
0
 public AnswerViewModel(IStringsProvider stringsProvider, IFileService fileService)
     : base(stringsProvider)
 {
     _fileService = fileService;
 }
 public FirstRazorModel(IStringsProvider stringsProvider)
 {
     this.StringsProvider = stringsProvider;
 }
Example #25
0
 public TileViewModel(IStringsProvider stringsProvider, ICategoryService categoryService) : base(stringsProvider)
 {
     _categoryService = categoryService;
 }
Example #26
0
 public AModelContainerViewModel(IStringsProvider stringsProvider) : base(stringsProvider)
 {
 }
Example #27
0
 public HamburgerMenuViewModel(IStringsProvider stringsProvider)
     : base(stringsProvider)
 {
 }
 public GlobalExceptionMiddleware(RequestDelegate next, ILogger <GlobalExceptionMiddleware> logger, IStringsProvider strings)
 {
     _next    = next ?? throw new ArgumentNullException(nameof(next));
     _logger  = logger;
     _strings = strings;
 }
Example #29
0
 public SettingsViewModel(IStringsProvider stringsProvider, HamburgerMenuViewModel hamburgerMenuViewModel)
     : base(stringsProvider)
 {
     HamburgerMenuViewModel = hamburgerMenuViewModel;
 }