private ResourceManager()
        {
            var dbContext = new KatushaDbContext();

            ListLock.EnterReadLock();
            var isEmpty = ResourceLookupList.Count <= 0;
            ListLock.ExitReadLock();
            if (isEmpty)  LoadResourceLookupFromDb(new ResourceLookupRepositoryDB(dbContext));
            
            ListLock.EnterReadLock();
            isEmpty = ResourceList.Count <= 0;
            ListLock.ExitReadLock();
            if (isEmpty) LoadResourceFromDb(new ResourceRepositoryDB(dbContext));

            ListLock.EnterReadLock();
            isEmpty = ConfigurationList.Count <= 0;
            ListLock.ExitReadLock();
            if (isEmpty) LoadConfigurationDataFromDb(new ConfigurationDataRepositoryDB(dbContext));

            ListLock.EnterReadLock();
            isEmpty = !Location.Initialized;
            ListLock.ExitReadLock();
            if (isEmpty) {
                LoadGeoLocationDataFromDb(new GeoCountryRepositoryDB(dbContext), new GeoLanguageRepositoryDB(dbContext), new GeoNameRepositoryDB(dbContext), new GeoTimeZoneRepositoryDB(dbContext));
            }
            ListLock.EnterReadLock();
            ConfigParser.BlockedIpList(BlockedIpList);
            ListLock.ExitReadLock();
        }
 public GeoTimeZoneRepositoryDB(IKatushaDbContext dbContext) { _dbContext = dbContext as KatushaDbContext; }
 public GeoLanguageRepositoryDB(IKatushaDbContext dbContext) { _dbContext = dbContext as KatushaDbContext; }
 public GeoCountryRepositoryDB(IKatushaDbContext dbContext) { _dbContext = dbContext as KatushaDbContext; }
 public GeoNameRepositoryDB(IKatushaDbContext dbContext) { _dbContext = dbContext as KatushaDbContext; }