public ProfileViewModel( IPreferencesService preferencesService, LogInControlViewModel loginControlViewModel) { this.preferencesService = preferencesService; LoginControlViewModel = loginControlViewModel; }
public RestApiBase(Uri baseAddress) { _requestInterceptors = new List <IRequestInterceptor>(); _baseAddress = baseAddress; _preferencesService = ServiceLocator.Current.GetInstance <IPreferencesService>(); }
/// <summary> /// Initializes a new instance of the <see cref="LanguagesService" /> class. /// </summary> /// <param name="localizationManager">The localization manager.</param> /// <param name="resourceProvider">The resource provider.</param> /// <param name="preferencesService">The preferences service.</param> /// <param name="storageProvider">The storage provider.</param> /// <param name="mapper">The mapper.</param> public LanguagesService(ILocalizationManager localizationManager, IDefaultLocalizationResourceProvider resourceProvider, IPreferencesService preferencesService, IStorageProvider storageProvider, IMapper mapper) : base(storageProvider, mapper) { this.resourceProvider = resourceProvider; this.preferencesService = preferencesService; this.localizationManager = localizationManager; }
public MainWindowVM(IKernel kernel, IEventAggregator eventAggregator, ITwitchService twitchService, IDialogService dialogService, INavigationService navigationService, ISearchService searchService, IPreferencesService preferencesService, IRuntimeDataService runtimeDataService, IUpdateService updateService) { AssemblyUtil au = AssemblyUtil.Get; _title = au.GetProductName() + " " + au.GetAssemblyVersion().Trim(); _kernel = kernel; _eventAggregator = eventAggregator; _twitchService = twitchService; _dialogService = dialogService; _navigationService = navigationService; _searchService = searchService; _preferencesService = preferencesService; _runtimeDataService = runtimeDataService; _updateService = updateService; _commandLockObject = new object(); _eventAggregator.GetEvent <ShowViewEvent>().Subscribe(ShowView); _eventAggregator.GetEvent <IsAuthorizedChangedEvent>().Subscribe(IsAuthorizedChanged); _eventAggregator.GetEvent <PreferencesSavedEvent>().Subscribe(PreferencesSaved); _eventAggregator.GetEvent <VideosCountChangedEvent>().Subscribe(VideosCountChanged); _eventAggregator.GetEvent <DownloadsCountChangedEvent>().Subscribe(DownloadsCountChanged); _showDonationButton = _preferencesService.CurrentPreferences.AppShowDonationButton; }
public RefitService( IPreferencesService preferenceService, IAppSecretsService appSecretsService) { this.preferenceService = preferenceService; this.appSecretsService = appSecretsService; }
public MainWindowVM(IKernel kernel, IEventAggregator eventAggregator, ITwitchService twitchService, IGuiService guiService, IPreferencesService preferencesService, IUpdateService updateService) { this.mainViews = new Dictionary <Type, ViewModelBase>(); this.windowState = WindowState.Normal; AssemblyUtil au = AssemblyUtil.Get; this.title = au.GetProductName() + " " + au.GetAssemblyVersion().Trim(); this.kernel = kernel; this.eventAggregator = eventAggregator; this.twitchService = twitchService; this.guiService = guiService; this.preferencesService = preferencesService; this.updateService = updateService; this.ShowMainView <WelcomeViewVM>(); this.eventAggregator.GetEvent <SearchBeginEvent>().Subscribe(() => this.ShowMainView <VideosLoadingViewVM>()); this.eventAggregator.GetEvent <SearchCompleteEvent>().Subscribe(() => this.ShowMainView <VideosViewVM>()); this.eventAggregator.GetEvent <ShowVideosEvent>().Subscribe(() => this.ShowMainView <VideosViewVM>()); this.eventAggregator.GetEvent <ShowDownloadsEvent>().Subscribe(() => this.ShowMainView <DownloadsViewVM>()); this.eventAggregator.GetEvent <ShowPreferencesEvent>().Subscribe(() => this.ShowMainView <PreferencesViewVM>()); this.eventAggregator.GetEvent <ShowInfoEvent>().Subscribe(() => this.ShowMainView <InfoViewVM>()); this.eventAggregator.GetEvent <PreferencesSavedEvent>().Subscribe(() => this.PreferencesSaved()); }
public ActionResult <WeatherForecast> UpdatePreferences( [FromBody] string location, [FromServices] IPreferencesService preferences) { preferences.UpdateLocation(location); return(NoContent()); }
public SearchResultViewVM( IEventAggregator eventAggregator, IApiService apiService, IAuthService authService, IDialogService dialogService, INavigationService navigationService, IPreferencesService preferencesService, ISearchService searchService, IFilenameService filenameService) { _eventAggregator = eventAggregator; _apiService = apiService; _dialogService = dialogService; _navigationService = navigationService; _preferencesService = preferencesService; _searchService = searchService; _filenameService = filenameService; _searchService.PropertyChanged += SearchService_PropertyChanged; _commandLockObject = new object(); _eventAggregator.GetEvent <SubOnlyAuthChangedEvent>().Subscribe(SubOnlyAuthChanged); _isAuthenticatedSubOnly = authService.IsAuthenticatedSubOnly; }
public TwitchService( IPreferencesService preferencesService, IProcessingService processingService, IRuntimeDataService runtimeDataService, IEventAggregator eventAggregator) { _preferencesService = preferencesService; _processingService = processingService; _runtimeDataService = runtimeDataService; _eventAggregator = eventAggregator; _videos = new ObservableCollection <TwitchVideo>(); _videos.CollectionChanged += Videos_CollectionChanged; _downloads = new ObservableCollection <TwitchVideoDownload>(); _downloads.CollectionChanged += Downloads_CollectionChanged; _downloadTasks = new ConcurrentDictionary <string, DownloadTask>(); _appDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); _changeDownloadLockObject = new object(); _downloadTimer = new Timer(DownloadTimerCallback, null, 0, TIMER_INTERVALL); _eventAggregator.GetEvent <RemoveDownloadEvent>().Subscribe(Remove, ThreadOption.UIThread); }
public WelcomeViewVM( IPreferencesService preferencesService, IPersistenceService persistenceService, IDialogService dialogService, ITwitchService twitchService) { _preferencesService = preferencesService; _persistenceService = persistenceService; _dialogService = dialogService; _twitchService = twitchService; AssemblyUtil au = AssemblyUtil.Get; ProductName = au.GetProductName() + " " + au.GetAssemblyVersion().Trim(); if (_preferencesService.CurrentPreferences.DownloadRememberQueue) { _persistenceService.GetDownloads(); if (_persistenceService.Downloads.Count > 0) { if (_dialogService.ShowMessageBox("You had downloads from your previous session would you like to resume them?", "Restore previous session?", MessageBoxButton.YesNo) == MessageBoxResult.Yes) { foreach (var itm in _persistenceService.Downloads) { _twitchService.Enqueue(itm.DownloadParams, id: itm.Id); } } else { _persistenceService.PurgeDownloads(); } } } }
public TwitchService(IPreferencesService preferencesService, IEventAggregator eventAggregator) { if (preferencesService == null) { throw new ArgumentNullException(nameof(preferencesService)); } if (eventAggregator == null) { throw new ArgumentNullException(nameof(eventAggregator)); } this.preferencesService = preferencesService; this.eventAggregator = eventAggregator; this.videos = new ObservableCollection <TwitchVideo>(); this.downloads = new ObservableCollection <TwitchVideoDownload>(); this.downloadTasks = new ConcurrentDictionary <string, DownloadTask>(); this.appDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); this.changeDownloadLockObject = new object(); this.orderMap = new Dictionary <VideoQuality, int>(); this.orderMap.Add(VideoQuality.Source, 0); this.orderMap.Add(VideoQuality.High, 1); this.orderMap.Add(VideoQuality.Medium, 2); this.orderMap.Add(VideoQuality.Low, 3); this.orderMap.Add(VideoQuality.Mobile, 4); this.downloadTimer = new Timer(this.DownloadTimerCallback, null, 0, TIMER_INTERVALL); this.eventAggregator.GetEvent <DownloadCompletedEvent>().Subscribe(this.Remove, ThreadOption.UIThread); }
public Request(RestApiBase restApiBase, string url, IList <KeyValuePair <string, string> > queryItems) { _restApiBase = restApiBase; _url = url; _queryItems = queryItems; _preferencesService = App.Container.Resolve <IPreferencesService>(); }
public MainWindowVM(IKernel kernel, IEventAggregator eventAggregator, ITwitchService twitchService, IDialogService dialogService, INavigationService navigationService, ISearchService searchService, IPreferencesService preferencesService, IRuntimeDataService runtimeDataService, IUpdateService updateService) { AssemblyUtil au = AssemblyUtil.Get; this.title = au.GetProductName() + " " + au.GetAssemblyVersion().Trim(); this.kernel = kernel; this.eventAggregator = eventAggregator; this.twitchService = twitchService; this.dialogService = dialogService; this.navigationService = navigationService; this.searchService = searchService; this.preferencesService = preferencesService; this.runtimeDataService = runtimeDataService; this.updateService = updateService; this.commandLockObject = new object(); this.eventAggregator.GetEvent <ShowViewEvent>().Subscribe(this.ShowView); this.eventAggregator.GetEvent <IsAuthorizedChangedEvent>().Subscribe(this.IsAuthorizedChanged); this.eventAggregator.GetEvent <VideosCountChangedEvent>().Subscribe(this.VideosCountChanged); this.eventAggregator.GetEvent <DownloadsCountChangedEvent>().Subscribe(this.DownloadsCountChanged); }
public PreferencesController(IPreferencesService iPreferencesService, IEmployeeService iEmployeeService, IMerchantService iMerchantService) { this.iPreferencesService = iPreferencesService; this.iEmployeeService = iEmployeeService; this.iMerchantService = iMerchantService; }
public UserDataService(IHttpDataService httpDataService, ILoggerService loggerService, IPreferencesService preferencesService, ITermsUpdateService termsUpdateService, IExposureNotificationService exposureNotificationService) { this.httpDataService = httpDataService; this.loggerService = loggerService; this.preferencesService = preferencesService; this.termsUpdateService = termsUpdateService; this.exposureNotificationService = exposureNotificationService; }
public EditPreferencesPresenter(IChildPresenter <IJiraLoginView, IJiraLoginParent> childPresenter, IPreferencesService preferences, IJiraService jira, IErrorMessageService errors) { _childPresenter = childPresenter; _preferences = preferences; _jira = jira; _errors = errors; }
public AuthenticationManager( IApiFactory apiFactory, IPreferencesService preferencesService) { _preferencesService = preferencesService; _authApi = apiFactory.AuthApi; }
public SendEventLogStateRepository( IPreferencesService preferencesService, ILoggerService loggerService ) { _preferencesService = preferencesService; _loggerService = loggerService; }
public Migrator_1_3_0( IPreferencesService preferencesService, ILoggerService loggerService ) { _preferencesService = preferencesService; _loggerService = loggerService; }
public QuickNoteViewModel(INotesService notesService, IPreferencesService preferencesService) { _notesService = notesService; _preferencesService = preferencesService; fontFamily = _preferencesService.Preferences.NotesFontFamily; fontSize = _preferencesService.Preferences.NotesFontSize; }
string AbsolutePathForKey(IPreferencesService service, string key) { if (key.StartsWith("/")) { return(key); } return(string.Format("{0}/{1}", OwnerString, key)); }
public ThumbnailSynchronizer( IPreferencesService preferencesService, IFileSystemService fileSystemService, IMessageHub messageHub) { _preferencesService = preferencesService; _fileSystemService = fileSystemService; _messageHub = messageHub; }
public LoginViewModelTest() { //Constructor is called for every test _connectivityService = new Mock <IConnectivityService>().Object; _preferencesService = new Mock <IPreferencesService>().Object; _navigationService = new Mock <INavigationService>().Object; _authenticationService = new Mock <IAuthenticationService>().Object; _dialogService = new Mock <IDialogService>().Object; }
public StoreViewModel( IPreferencesService preferencesService) { this.preferencesService = preferencesService; ConfigCommand = new AsyncCommand(() => ConfigCommandAsync()); ProductsCommand = new AsyncCommand(() => ProductsCommandAsync()); CloseSessionCommand = new AsyncCommand(() => CloseSessionCommandAsync()); }
/// <summary> /// Initializes a new instance of the <see cref="GameService" /> class. /// </summary> /// <param name="messageBus">The message bus.</param> /// <param name="reportExportService">The report export service.</param> /// <param name="reader">The reader.</param> /// <param name="storageProvider">The storage provider.</param> /// <param name="preferencesService">The preferences service.</param> /// <param name="mapper">The mapper.</param> public GameService(IMessageBus messageBus, IReportExportService reportExportService, IReader reader, IStorageProvider storageProvider, IPreferencesService preferencesService, IMapper mapper) : base(storageProvider, mapper) { this.messageBus = messageBus; this.reportExportService = reportExportService; this.preferencesService = preferencesService; this.reader = reader; pathResolver = new PathResolver(); }
public NotifyController(IOrderHousePaymentService iOrderHousePaymentService, IPreferencesService iPreferencesService, IOrderPaidService iOrderPaidService) { this.iOrderHousePaymentService = iOrderHousePaymentService; this.iPreferencesService = iPreferencesService; this.iOrderPaidService = iOrderPaidService; logger = LogManager.GetCurrentClassLogger(); }
public ExposureNotificationService(ILoggerService loggerService, IHttpClientService httpClientService, ISecureStorageService secureStorageService, IPreferencesService preferencesService, IApplicationPropertyService applicationPropertyService) { this.loggerService = loggerService; this.httpClientService = httpClientService; this.secureStorageService = secureStorageService; this.preferencesService = preferencesService; this.applicationPropertyService = applicationPropertyService; _ = GetExposureNotificationConfig(); }
/// <summary> /// Инициализирует одноэлементный объект приложения. Это первая выполняемая строка разрабатываемого /// кода; поэтому она является логическим эквивалентом main() или WinMain(). /// </summary> public App() { this.InitializeComponent(); this.Suspending += OnSuspending; this.UnhandledException += OnUnhandledException; RegisterDependencies(); _preferencesService = ServiceLocator.Current.GetInstance <IPreferencesService>(); }
public UserDataRepository( IPreferencesService preferencesService, IDateTimeUtility dateTimeUtility, ILoggerService loggerService ) { _preferencesService = preferencesService; _dateTimeUtility = dateTimeUtility; _loggerService = loggerService; }
public MainWindowTasksGridViewModel(IEventAggregator eventAggregator, IUnityContainer unityContainer, IPreferencesService preferencesService, ITaskService taskService, IUserService userService) : base(eventAggregator, unityContainer, userService) { this.preferencesService = preferencesService; this.taskService = taskService; this.taskSearchCriteria = new TaskSearchCriteria(); Pagination = new PaginationViewModel(eventAggregator, preferencesService); ProgressBar = new ProgressBarViewModel(eventAggregator, preferencesService); }
public LoginViewModel() : base() { _currentStateService.SetupTextProvider(); _webService = Mvx.Resolve<IWebService>(); _preferences = Mvx.Resolve<IPreferencesService>(); if (!string.IsNullOrEmpty(_preferences.Username) && !string.IsNullOrEmpty(_preferences.Password)) { LogInUser(); } }
public MenuViewModel() { _webService = Mvx.Resolve<IWebService>(); _preferences = Mvx.Resolve<IPreferencesService>(); LoadMenuData(); }