public SettingsServiceBase(IServiceProvider sp) { _sp = sp; _settingsCache = _sp.GetRequiredService <ISettingsCache>(); _tenantIdAccessor = _sp.GetRequiredService <ITenantIdAccessor>(); _repo = _sp.GetRequiredService <ApplicationRepository>(); }
public UnityNUnitServiceProvider(ISolution solution, IPsiModules psiModules, ISymbolCache symbolCache, IUnitTestElementIdFactory idFactory, IUnitTestElementManager elementManager, NUnitTestProvider provider, IUnitTestingSettings settings, ISettingsStore settingsStore, ISettingsOptimization settingsOptimization, ISettingsCache settingsCache, UnitTestingCachingService cachingService, INUnitTestParametersProvider testParametersProvider, UnityEditorProtocol editorProtocol, RunViaUnityEditorStrategy runViaUnityEditorStrategy, UnitySolutionTracker unitySolutionTracker) : base(solution, psiModules, symbolCache, idFactory, elementManager, provider, settings, settingsStore, settingsOptimization, settingsCache, cachingService, testParametersProvider) { if (solution.GetData(ProjectModelExtensions.ProtocolSolutionKey) == null) { return; } myRdUnityModel = solution.GetProtocolSolution().GetRdUnityModel(); myEditorProtocol = editorProtocol; myUnityEditorStrategy = runViaUnityEditorStrategy; myUnitySolutionTracker = unitySolutionTracker; }
public ApplicationSettingsServiceBase(ApplicationSettingsServiceDependencies deps) : base(deps.Context) { _settingsCache = deps.SettingsCache; _permissionsCache = deps.PermissionsCache; _behavior = deps.Behavior; _metadataProvider = deps.MetadataProvider; }
public UnityNUnitServiceProvider(ISolution solution, IPsiModules psiModules, ISymbolCache symbolCache, IUnitTestElementIdFactory idFactory, IUnitTestElementManager elementManager, NUnitTestProvider provider, IUnitTestingSettings settings, ISettingsStore settingsStore, ISettingsOptimization settingsOptimization, ISettingsCache settingsCache, UnitTestingCachingService cachingService, INUnitTestParametersProvider testParametersProvider, FrontendBackendHost frontendBackendHost, BackendUnityHost backendUnityHost, RunViaUnityEditorStrategy runViaUnityEditorStrategy, UnitySolutionTracker unitySolutionTracker) : base(solution, psiModules, symbolCache, idFactory, elementManager, provider, settings, settingsStore, settingsOptimization, settingsCache, cachingService, testParametersProvider) { // Only in tests if (!frontendBackendHost.IsAvailable) { return; } myFrontendBackendModel = frontendBackendHost.Model.NotNull("frontendBackendHost.Model != null"); myBackendUnityHost = backendUnityHost; myUnityEditorStrategy = runViaUnityEditorStrategy; myUnitySolutionTracker = unitySolutionTracker; }
public ExchangeRatesService( ApplicationRepository repo, ISettingsCache settingsCache, IServiceProvider sp) : base(sp) { _repo = repo; _settingsCache = settingsCache; }
public GeneralSettingsService( ApplicationSettingsServiceDependencies deps, IStringLocalizer <Strings> localizer, ISettingsCache settingsCache) : base(deps) { _localizer = localizer; _settingsCache = settingsCache; _behavior = deps.Behavior; }
public ApplicationApiFilter(IServiceProvider sp) { _appRepo = sp.GetRequiredService <ApplicationRepository>(); _tenantIdAccessor = sp.GetRequiredService <ITenantIdAccessor>(); _tenantInfoAccessor = sp.GetRequiredService <ITenantInfoAccessor>(); _externalUserAccessor = sp.GetRequiredService <IExternalUserAccessor>(); _definitionsCache = sp.GetRequiredService <IDefinitionsCache>(); _settingsCache = sp.GetRequiredService <ISettingsCache>(); _serviceProvider = sp; }
public SummaryEntriesController( ILogger <SummaryEntriesController> logger, IStringLocalizer <Strings> localizer, ApplicationRepository repo, ISettingsCache settingsCache) : base(logger, localizer) { _logger = logger; _localizer = localizer; _repo = repo; _settingsCache = settingsCache; }
public ApplicationApiFilter(ITenantIdAccessor tenantIdAccessor, ApplicationRepository appRepo, ITenantInfoAccessor tenantInfoAccessor, IExternalUserAccessor externalUserAccessor, IServiceProvider serviceProvider, IDefinitionsCache definitionsCache, ISettingsCache settingsCache) { _appRepo = appRepo; _tenantIdAccessor = tenantIdAccessor; _tenantInfoAccessor = tenantInfoAccessor; _externalUserAccessor = externalUserAccessor; _serviceProvider = serviceProvider; _definitionsCache = definitionsCache; _settingsCache = settingsCache; }
public SettingsController(ApplicationRepository repo, ILogger <SettingsController> logger, IStringLocalizer <Strings> localizer, ISettingsCache settingsCache, ITenantIdAccessor tenantIdAccessor) { _repo = repo; _logger = logger; _localizer = localizer; _settingsCache = settingsCache; _tenantIdAccessor = tenantIdAccessor; }
private ISettingCache GetSettingCacheTwo(ISettingsCache settingsCache) { return(new SettingCacheImpl() { LastDriverName = new Func <string>(() => settingsCache.LastDriverNameTwo()), LastPath = new Func <List <string> >(() => settingsCache.LastPathTwo()), SaveLastDriverName = new Action <string>((name) => settingsCache.SaveLastDriverNameTwo(name)), SaveLastPath = new Action <List <string> >((list) => settingsCache.SaveLastPathTwo(list)) }); }
public ApplicationSettingsServiceDependencies( IServiceContextAccessor context, ISettingsCache settingsCache, IPermissionsCache permissionsCache, ApplicationServiceBehavior behavior, MetadataProvider metadataProvider) { Context = context; SettingsCache = settingsCache; PermissionsCache = permissionsCache; Behavior = behavior; MetadataProvider = metadataProvider; }
public MainForm() { InitializeComponent(); BindCmdRuner(); settingsCache = new SettingsCacheIniImpl(); LoadSizeFromCache(); LoadPositionFromCache(); dataGridViewOne.Cache = GetSettingCacheOne(settingsCache); dataGridViewTwo.Cache = GetSettingCacheTwo(settingsCache); dataGridViewOne.GotFocus += (sender, e) => lastFocusedFileDataGridView = dataGridViewOne; dataGridViewTwo.GotFocus += (sender, e) => lastFocusedFileDataGridView = dataGridViewTwo; dataGridViewOne.UpdateView += (dataGrid) => labelOne.Text = dataGrid.GetCurrentPath(); dataGridViewTwo.UpdateView += (dataGrid) => labelTwo.Text = dataGrid.GetCurrentPath(); dataGridViewOne.GlobalErrorHandler += (ex) => MessageBox.Show(ex.Message, "Ошибка!", MessageBoxButtons.OK, MessageBoxIcon.Error); dataGridViewTwo.GlobalErrorHandler += (ex) => MessageBox.Show(ex.Message, "Ошибка!", MessageBoxButtons.OK, MessageBoxIcon.Error); Bind(dataGridViewOne, comboBoxOne); Bind(dataGridViewTwo, comboBoxTwo); BindFocus(dataGridViewOne, panelOneChoseDisk); BindFocus(dataGridViewTwo, panelTwoChoseDisk); dataGridViewOne.UpdateDrives(); dataGridViewTwo.UpdateDrives(); dataGridViewOne.Focus(); //TODO сделать систему коммитов, чтобы каждый пиксель не записывать this.SizeChanged += (sender, e) => { Console.WriteLine("SizeChange"); settingsCache.Width = this.Width; settingsCache.Height = this.Height; }; this.LocationChanged += (sender, e) => { settingsCache.XPosition = this.Location.X; settingsCache.YPosition = this.Location.Y; }; this.MouseMove += (sender, e) => { if (Clipboard.ContainsFileDropList()) { Console.WriteLine(Clipboard.GetFileDropList()); } }; }
public CompaniesService( IServiceContextAccessor accessor, AdminRepository db, IApplicationRepositoryFactory factory, ISettingsCache settingsCache, NullServiceBehavior behavior, ILogger <CompaniesService> logger) : base(accessor) { _adminRepo = db; _factory = factory; _settingsCache = settingsCache; _logger = logger; _behavior = behavior; }
public DocumentsController(ILogger <DocumentsController> logger, IStringLocalizer <Strings> localizer, ApplicationRepository repo, ITenantIdAccessor tenantIdAccessor, IBlobService blobService, IDefinitionsCache definitionsCache, ISettingsCache settingsCache, IClientInfoAccessor clientInfo, IModelMetadataProvider modelMetadataProvider, ITenantInfoAccessor tenantInfoAccessor) : base(logger, localizer) { _logger = logger; _localizer = localizer; _repo = repo; _tenantIdAccessor = tenantIdAccessor; _blobService = blobService; _definitionsCache = definitionsCache; _settingsCache = settingsCache; _clientInfo = clientInfo; _modelMetadataProvider = modelMetadataProvider; _tenantInfoAccessor = tenantInfoAccessor; }
public SettingsManager(ITableStorage storage, ISettingsCache cache, int cacheAbsoluteExpirationInHours = 24) { if (storage == null) { throw new ArgumentNullException("storage"); } _storage = storage; if (cache == null) { throw new ArgumentNullException("cache"); } _cache = cache; _cacheAbsoluteExpirationInHours = cacheAbsoluteExpirationInHours; }
public TodoItemsCountProvider( Lifetime lifetime, IPrimaryTodoManager primaryTodoManager, SolutionSettingsCache solutionSettingsCache, TodoItemsCountDefinitionsCachedSettingsReader todoItemsCountDefinitionsCachedSettingsReader, IEnumerable <ITodoItemsCountConsumer> todoItemsCountConsumers, ISettingsStore settingsStore) { _primaryTodoManager = primaryTodoManager; _settingsCache = solutionSettingsCache; _todoItemsCountDefinitionsCachedSettingsReader = todoItemsCountDefinitionsCachedSettingsReader; _todoItemsCountConsumers = todoItemsCountConsumers.ToIReadOnlyList(); _primaryTodoManager.FilesWereUpdated.Advise(lifetime, files => { // Check for invalid changed files, else we'll get "not valid" exceptions in the 'AllItems' access // later (at least as observed during unit test shut down): if (files.WhereNotNull().All(x => x.IsValid())) { UpdateTodoItemsCounts(); } }); var settingsCacheGetDataSequentialLifeTime = new SequentialLifetimes(lifetime); _currentSettingsCacheLifeTime = settingsCacheGetDataSequentialLifeTime.Next(); settingsStore.AdviseChange(lifetime, _todoItemsCountDefinitionsCachedSettingsReader.KeyExposed, () => { // We use the following lifetime to solve the issue that this 'ISettingsStore.AdviseChange()' callback // arrives earlier than the one used in the cache. => The cache has still the old value when accessed // in 'UpdateTodoItemsCounts()'. => Terminate the cache lifetime explicitly. _currentSettingsCacheLifeTime = settingsCacheGetDataSequentialLifeTime.Next(); UpdateTodoItemsCounts(); }); foreach (var consumer in _todoItemsCountConsumers) { consumer.UpdateRequestSignal.Advise(lifetime, () => { UpdateTodoItemsCounts(); }); } // IDEA: Combine the three event sources and execute update in background thread? }
public UnityNUnitServiceProvider(ISolution solution, IPsiModules psiModules, ISymbolCache symbolCache, IUnitTestElementIdFactory idFactory, IUnitTestElementManager elementManager, NUnitTestProvider provider, ISettingsStore settingsStore, ISettingsOptimization settingsOptimization, ISettingsCache settingsCache, UnitTestingCachingService cachingService, IDotNetCoreSdkResolver dotNetCoreSdkResolver, UnityEditorProtocol unityEditorProtocol, RunViaUnityEditorStrategy runViaUnityEditorStrategy, NUnitOutOfProcessUnitTestRunStrategy nUnitOutOfProcessUnitTestRunStrategy) : base(solution, psiModules, symbolCache, idFactory, elementManager, provider, settingsStore, settingsOptimization, settingsCache, cachingService, dotNetCoreSdkResolver, nUnitOutOfProcessUnitTestRunStrategy) { myUnityEditorProtocol = unityEditorProtocol; myUnityEditorStrategy = runViaUnityEditorStrategy; }
public void SetUp() { cache = Substitute.For <ISettingsCache <NonIdempotencySign> >(); blackListIdempotencyResolver = new BlackListIdempotencyResolver(cache); }
public UnityNUnitServiceProvider(ISolution solution, IPsiModules psiModules, ISymbolCache symbolCache, IUnitTestElementIdFactory idFactory, IUnitTestElementManager elementManager, NUnitTestProvider provider, ISettingsStore settingsStore, ISettingsOptimization settingsOptimization, ISettingsCache settingsCache, UnitTestingCachingService cachingService, IDotNetCoreSdkResolver dotNetCoreSdkResolver, UnityEditorProtocol editorProtocol, RunViaUnityEditorStrategy runViaUnityEditorStrategy, NUnitOutOfProcessUnitTestRunStrategy nUnitOutOfProcessUnitTestRunStrategy) : base(solution, psiModules, symbolCache, idFactory, elementManager, provider, settingsStore, settingsOptimization, settingsCache, cachingService, dotNetCoreSdkResolver, nUnitOutOfProcessUnitTestRunStrategy) { if (solution.GetData(ProjectModelExtensions.ProtocolSolutionKey) == null) { return; } myRdUnityModel = solution.GetProtocolSolution().GetRdUnityModel(); myEditorModel = editorProtocol.UnityModel; myUnityEditorStrategy = runViaUnityEditorStrategy; }
public SettingsManager(ISettingsCache <TSetting> settingsCache, ISettingsRepository <TSetting> settingsRepository) { this.settingsCache = settingsCache; this.settingsRepository = settingsRepository; }
/// <summary> /// Initializes a new instance of the <see cref="AppConfigInterceptor"/> type. /// </summary> /// <param name="settingsProvider">The settings provider.</param> /// <param name="settingsCache">The settings cache.</param> public AppConfigInterceptor(ISettingsProvider settingsProvider, ISettingsCache settingsCache) { _settingsProvider = settingsProvider; _settingsCache = settingsCache; }
public BlackListIdempotencyResolver(ISettingsCache <NonIdempotencySign> nonIdempotencySignsCache) { this.nonIdempotencySignsCache = nonIdempotencySignsCache; }
public GeneralSettingsController(IServiceProvider sp, GeneralSettingsService service, ILogger <GeneralSettingsController> logger, ISettingsCache settingsCache) : base(sp) { _service = service; _logger = logger; _settingsCache = settingsCache; }
public void SetUp() { iclCache = Substitute.For <ISettingsCache <IdempotencyControlRule> >(); iclResolver = new IclResolver(iclCache); }
public DashboardDefinitionsService(ApplicationRepository repo, ISettingsCache settingsCache, IDefinitionsCache defCache, IServiceProvider sp) : base(sp) { _repo = repo; _settingsCache = settingsCache; _defCache = defCache; }
public IclResolver(ISettingsCache <IdempotencyControlRule> iclCache) { this.iclCache = iclCache; }
public SettingsController(AutomaticaContext dbContext, IAutoUpdateHandler updateHandler, ISettingsCache settingsCache) : base(dbContext) { _updateHandler = updateHandler; _settingsCache = settingsCache; }