public void SetTimescaleDataManagerTs() { const string DATABASE_FACTORY_SETTINGS_SECTION_NAME = "DbFactorySettings"; var dbFactorySettings = new DbFactorySettings(); _apiConfiguration.Configuration.GetSection(DATABASE_FACTORY_SETTINGS_SECTION_NAME).Bind(dbFactorySettings); _apiConfiguration.Services.AddTransient <IDbFactory, TimescaleDbFactory>(); _apiConfiguration.Services.AddTransient <IHeartBeatDataManager, HeartBeatDataManagerTs>(); _apiConfiguration.Services.AddTransient <IResourceDataManager, ResourcesDataManagerTs>(); _apiConfiguration.Services.AddTransient <IUsersDataManagerTsHelpers, UsersDataManagerTsHelpers>(); _apiConfiguration.Services.AddTransient <IUsersDataManager, UsersDataManagerTs>(); _apiConfiguration.Services.AddTransient <IDataManagersHelpersTs, DataManagersHelpersTs>(); _apiConfiguration.Services.AddTransient <IUsersDataManager, UsersDataManagerTs>(); _apiConfiguration.Services.AddTransient <ITokensManager, TokensManagerTs>(); _apiConfiguration.Services.AddTransient <ITenantObjectsManager, TenantsObjectsManagetTs>(); _apiConfiguration.Services.AddTransient <IDataStorageInfrastructureManager, TimescaleInfrastructure>(); _apiConfiguration.Services.AddTransient <ITimescaleInfrastructureHelpers, TimescaleInfrastructureHelpers>(); _apiConfiguration.Services.AddSingleton <IServersManager, ServersManagerTs>(); }
public TimescaleDbFactory(ISettingsManager settingsManager) { _settingsManager = settingsManager; _dbFactorySettings = _settingsManager.FullSettings.DbFactorySettings; }