/// <summary> /// The constructor is private so that only the class itself can create an instance. /// </summary> private BannedHostsCache() { dbProvider = DBConnectionStringProvider.Instance(); connectionString = dbProvider.ProvideDBConnectionString("CrawlWave.ServerCommon.BannedHostsCache"); dbcon = new SqlConnection(connectionString); hosts = new Dictionary <byte[], string>(); LoadCache(); }
/// <summary> /// The constructor is private so that only the class itself can create an instance. /// </summary> private UrlDataProvider() { dbProvider = DBConnectionStringProvider.Instance(); connectionString = dbProvider.ProvideDBConnectionString("CrawlWave.ServerCommon.UrlDataProvider"); dbcon = new SqlConnection(connectionString); }