/// <summary> /// Constructor /// </summary> /// <param name="preferenceService"></param> /// <param name="configuration"></param> /// <param name="logger"></param> public UserPreferenceV1Controller(IPreferenceService preferenceService, IConfiguration configuration, ILogger logger) { this.configuration = configuration; this.logger = logger; _preferenceService = preferenceService; }
// TODO: Refactor dependency mess public SoundGeneratorViewModel(ISessionContextService sessionContext, IDialogService dialogService, IFoldersExplorerFactory <SoundEvent, Sound> factory, IPreferenceService preferenceService, ISoundJsonUpdaterFactory jsonUpdaterFactory, IEditorFormFactory <Sound> editorFormFactory, IUniqueValidator <SoundEvent> soundEventValidator, ICodeGenerationService codeGenerationService) : base(sessionContext, dialogService, factory) { Preferences = preferenceService.GetOrCreate <SoundsGeneratorPreferences>(); PreferenceService = preferenceService; JsonUpdaterFactory = jsonUpdaterFactory; SoundEventValidator = soundEventValidator; CodeGenerationService = codeGenerationService; Explorer.AllowFileExtensions(".ogg"); Explorer.OpenFileDialog.Filter = "Sound file (*.ogg) | *.ogg"; Explorer.OpenFileDialog.Multiselect = true; Explorer.OpenFileDialog.CheckFileExists = true; Explorer.OpenFileDialog.ValidateNames = true; Explorer.OpenFolderDialog.ShowNewFolderButton = true; FileEditor = editorFormFactory.Create(); FileEditor.ItemEdited += OnSoundEdited; }
public StopListViewModel( ILoggerService loggerService, IPreferenceService preferenceService, IUserInteractionService userInteractionService) : base(loggerService, preferenceService, userInteractionService) { }
public AdminAPIController(IAdminService _HomeService, IManageAdminService manageAdminService, IPreferenceService prefenceService, IUserService userService) { _adminService = _HomeService; _manageAdminService = manageAdminService; _prefenceService = prefenceService; _userService = userService; }
public CustomEasyCardClick() { InitializeComponent(); PreferenceServie = Locator.Instance.Resolve <IPreferenceService>(); IsChecked = PreferenceServie.GetPreference(PreferenceKey.Dungeon_01_Tr_01, false); CheckPref(false); }
public Startup(IPreferenceService preference, IFileService files, IRunNuget nuget) { _preference = preference; _files = files; _nuget = nuget; }
public GoodReadsDataSource(IPreferenceService preferenceService) { _preferenceService = preferenceService; _client = GoodreadsClient.Create( preferenceService.Get("goodreads.apikey", "ckvsiSDsuqh7omh74ZZ6Q"), // todo: this is the lazylibrarian key... preferenceService.Get("goodreads.apisecret", "") ); }
public PowerLogControlViewModel(IRegionManager regionManager, IEventAggregator eventAggregator, IPowerLogService powerLog, IPreferenceService preference) : base(regionManager) { EventAggregator = eventAggregator; EventAggregator.GetEvent <DateChangedEvent>().Subscribe(OnDateChanged, ThreadOption.UIThread).AddTo(Disposable); PowerLogService = powerLog; PreferenceService = preference; }
public TransmissionDownloadClient(IPreferenceService preferencesService) { _preferencesService = preferencesService; _client = new Client( preferencesService.Get("transmission.host", "127.0.0.1"), null, preferencesService.Get("transmission.username", "transmission"), preferencesService.Get("transmission.password", "transmission")); }
public MySqlMembreService(String connexion) { stringConnexion = connexion; restrictionAlimentaireService = new MySqlRestrictionAlimentaireService(); objectifService = new MySqlObjectifService(); preferenceService = new MySqlPreferenceService(); menuService = new MySqlMenuService(); }
public SabnzbdDownloadClient(IPreferenceService preferencesService) { _preferencesService = preferencesService; _category = preferencesService.Get("sabnzbd.category", "audiobooks"); _client = new SabClient( preferencesService.Get("sabnzbd.host", "127.0.0.1"), preferencesService.Get("sabnzbd.port", (ushort)8080), preferencesService.Get("sabnzbd.apikey", "")); }
public GetPreferences(IMapperProvider mapperProvider, IEncryptionProvider encryptionProvider, ICrmCacheProvider crmCacheProvider, ICategoryService categoryService, IPreferenceService preferenceService) : base(mapperProvider, encryptionProvider) { _crmCacheProvider = crmCacheProvider; _categoryService = categoryService; _preferenceService = preferenceService; }
public SaveCustomerPreferences(IMapperProvider mapperProvider, IEncryptionProvider encryptionProvider, ICustomerPreferenceService customerPreferenceService, IPreferenceService preferenceService, ICrmCacheProvider cacheProvider) : base(mapperProvider, encryptionProvider) { _customerPreferenceService = customerPreferenceService; _cacheProvider = cacheProvider; _preferenceService = preferenceService; }
public EntryViewModel( [NotNull] IPreferenceService preferenceService , [NotNull] IDeviceAction deviceAction ) { Guard.ThrowIfNull(preferenceService, nameof(preferenceService)); this.preferenceService = preferenceService; this.deviceAction = deviceAction; Initialize(); }
public CrmCacheProvider(ICacheProvider cacheProvider, IAttributeService attributeService, ICategoryService categoryService, IPreferenceService preferenceService) { _cacheProvider = cacheProvider; _attributeService = attributeService; _categoryService = categoryService; _preferenceService = preferenceService; }
private void ResolveDepedencies() { CurrentRequest.Resolver.AppName = "UEoffer-rew-pref.aspx"; m_Offer = CurrentRequest.Resolver.Resolve <IOffer>(); m_Preference = CurrentRequest.Resolver.Resolve <IPreferenceService>(); m_PreferenceReward = CurrentRequest.Resolver.Resolve <IPreferenceRewardService>(); m_ActivityLog = CurrentRequest.Resolver.Resolve <IActivityLogService>(); m_dbAccess = CurrentRequest.Resolver.Resolve <CMS.DB.IDBAccess>(); m_OAWService = CurrentRequest.Resolver.Resolve <IOfferApprovalWorkflowService>(); }
private async Task InitData() { IPairDeviceService pairDeviceService = FactorySingleton.FactoryOffline.Get <PairDeviceService>(); IMastersService mastersService = FactorySingleton.FactoryOffline.Get <MastersService>(); IPreferenceService preferenceService = FactorySingleton.FactoryOffline.Get <PreferenceService>(); await pairDeviceService.DeletePair(); await mastersService.ClearMasterPair(); await preferenceService.ClearPreference(); }
public DownloadManager(IPreferenceService preferencesService, IServiceProvider provider) { _provider = provider; _random = new Random(); _downloads = new List <DownloadHandle>(); _pollTimer = new Timer( ExecuteDownloadClientPoll, null, TimeSpan.Zero, TimeSpan.FromMinutes(preferencesService.Get("downloadmanager.pollmins", 2))); }
public CalendarControlViewModel(IRegionManager regionManager, IEventAggregator eventAggregator, IPowerLogService powerLog, IPreferenceService preference) : base(regionManager) { EventAggregator = eventAggregator; Preference = preference; PowerLogService = powerLog; DisplayDate = powerLog.ScannedDate.ToReactiveProperty().AddTo(Disposable); SelectedDate.Subscribe(OnSelectedDateChanged); ScanCompleted = powerLog.ScanCompleted.ToReadOnlyReactivePropertySlim().AddTo(Disposable); ScanCompleted.Subscribe(OnScanCompletedChanged).AddTo(Disposable); }
public SplashViewModel( IRepository <DeviceLocationModel> repository, INetworkingService networkingService, ILoggerService loggerService, IPreferenceService preferenceService, IUserInteractionService userInteractionService) : base(loggerService, preferenceService, userInteractionService) { _repository = repository; _networkingService = networkingService; _timer = new Timer(TimeSpan.FromSeconds(6), CheckRepositoryIsInitializedAndNavigateToNextViewModel).Start(); }
public SoundGeneratorViewModel(ISessionContextService sessionContext, IDialogService dialogService, IFoldersExplorerFactory <SoundEvent, Sound> factory, IPreferenceService preferenceService) : base(sessionContext, dialogService, factory) { PreferenceService = preferenceService; Preferences = preferenceService.GetOrCreate <SoundsGeneratorPreferences>(); Explorer.AllowedFileExtensions.Add(".ogg"); Explorer.OpenFileDialog.Filter = "Sound file (*.ogg) | *.ogg"; Explorer.OpenFileDialog.Multiselect = true; Explorer.OpenFileDialog.CheckFileExists = true; Explorer.OpenFileDialog.ValidateNames = true; Explorer.OpenFolderDialog.ShowNewFolderButton = true; FileEditor = new EditorForm <Sound>(Cache.Default, DialogService, new SoundEditForm()); FileEditor.ItemEdited += OnSoundEdited; }
public MainViewModel( IMvxNavigationService navigationService, IWeatherService weatherService, IProgressService progressService, ICacheService cacheService, IPreferenceService preferenceService) { _navigationService = navigationService; _weatherService = weatherService; _progressService = progressService; _cacheService = cacheService; _preferenceService = preferenceService; GoButtonCommand = new MvxAsyncCommand(DoButtonCommand, CanDoGotButton); }
public async Task TestSQLServicePreferenceService() { await InitData(); IPreferenceService preferenceService = FactorySingleton.FactoryOffline.Get <PreferenceService>(); Assert.IsNull(await preferenceService.GetPrefValue(PrefEnums.PinSecurityHash), "Error: preferenceService.GetPrefValue() not null after delete"); string pinhash = pinhashDemo; bool result = await preferenceService.SavePrefValue(PrefEnums.PinSecurityHash, pinhash); Assert.IsTrue(result, "Error: preferenceService.SavePrefValue"); Assert.IsNotNull(await preferenceService.GetPrefValue(PrefEnums.PinSecurityHash), "Error: preferenceService.GetPrefValue() null after save"); pinhash = await preferenceService.GetPrefValue(PrefEnums.PinSecurityHash); Assert.AreEqual(pinhash, pinhashDemo, "Error - not equal after save and get!"); await preferenceService.ClearPreference(); }
public PreferenceServiceTests() { configuration = Substitute.For <IConfiguration>(); logger = Substitute.For <ILogger>(); transaction = Substitute.For <ITransactions>(); configuration["PreferenceKafkaTopicNames"] = "VSS.Interfaces.Events.Preference.IPreferenceEvent"; configuration["TopicSuffix"] = "-Test"; preferenceService = new PreferenceService(configuration, logger, transaction); string[] topics = configuration["PreferenceKafkaTopicNames"].Split(','); transaction.Execute(Arg.Any <List <Action> >()).Returns(x => { foreach (var action in x.Arg <List <Action> >()) { action(); } return(true); }); }
public ViewModelPreferences(IPreferenceService preference) { this.Preference = preference; BsRootFolders = new BindingSource(); BsRootFolders.DataSource = new List <RootFolder>(); BsIgnorePaths = new BindingSource(); BsIgnorePaths.DataSource = new List <ScanIgnorePath>(); SqliteDBLocation = Storage.SqliteDatabaseLocation; PropertyChanged += async(s, e) => { if (e.PropertyName == nameof(FolderPath)) { return; } else if (e.PropertyName == nameof(SqliteDBLocation)) { return; } }; }
public DemoServiceLocatorMaster(UserContext context) : base(context) { userService = new DemoUserService(this); schoolService = new DemoSchoolService(this); chalkableDepartmentService = new DemoChalkableDepartmentService(this); categoryService = new DemoCategoryService(this); developerService = new DemoDeveloperService(this); districtService = new DemoDistrictService(this); emailService = new DemoEmailService(this); backgroundTaskService = new DemoBackgroundTaskService(this); applicationService = new DemoApplicationService(this); applicationUploadService = new DemoApplicationUploadService(this); preferenceService = new PreferenceService(this); personPictureService = new PersonPictureService(this); departmentIconService = new DepartmentIconService(this); applicationPictureService = new ApplicationPictureService(this); dbService = new DbService(Context != null ? Context.MasterConnectionString : null); userTrackingService = new NullTrackingService(); }
public SettingsDialogViewModel(IPreferenceService preferenceService) { PreferenceService = preferenceService; var preference = PreferenceService.Preference; RoundingRuleIndex.Value = (int)preference.Rounding; RoundUnit.Value = preference.RoundUnit; StartMargin.Value = preference.StartMargin; EndMargin.Value = preference.EndMargin; FirstDayIndex.Value = (int)preference.FirstDayOfWeek; DayOffset.Value = (int)preference.DayOffsetMinutes; DayOffset.Subscribe(OnDayOffsetChanged); MaxDays.Value = preference.MaxDays; MaxDays.Subscribe(OnMaxDaysChanged); EnableBlackoutDates.Value = preference.EnableBlackoutDates; EnableBlackoutDates.Subscribe(OnEnableBlackoutDatesChanged); OkCommand = new DelegateCommand(OnOkCommand); }
public ServiceLocatorMaster(UserContext context) : base(context) { userService = new UserService(this); schoolService = new SchoolService(this); backgroundTaskService = new BackgroundTaskService(this); preferenceService = new PreferenceService(this); chalkableDepartmentService = new ChalkableDepartmentService(this); personPictureService = new PersonPictureService(this); departmentIconService = new DepartmentIconService(this); customReportTemplateIconService = new CustomReportTemplateIconService(this); districtService = new DistrictService(this); applicationService = new ApplicationService(this); categoryService = new CategoryService(this); applicationUploadService = new ApplicationUploadService(this); EmailService = new EmailService(this); developerService = new DeveloperService(this); applicationPictureService = new ApplicationPictureService(this); DbService = new DbService(Context?.MasterConnectionString); userTrackingService = new MixPanelService(Settings.MixPanelToken); dbMaintenanceService = new DbMaintenanceService(this); academicBenchmarkService = new AcademicBenchmarkService(this); customReportTemplateService = new CustomReportTemplateService(this); }
public PreferencesController(IPreferenceService service) { this.service = service; }
public PreferenceController(IPreferenceService service, IActorService actService) { this.preferenceService = service; this.actorService = actService; }