Пример #1
0
 /// <summary>
 /// The constructor is private so that only the class itself can create an instance.
 /// </summary>
 private ServerSettings()
 {
     appName          = "CrawlWave.Server";
     log              = new SystemEventLogger(appName);
     logLevel         = CWLogLevel.LogError;        // by default assume only errors must be logged
     dbLogOptions     = CWClientActions.LogNothing; //by default assume it's a production rel.
     dataFilesPath    = String.Empty;
     connectionString = String.Empty;
     LoadSettings();
     robots = RobotsCache.Instance();
     robots.DBConnectionString = ProvideConnectionString();
 }
Пример #2
0
 /// <summary>
 /// Constructs a new instance of the <see cref="CrawlWave.ServerPlugins.UrlSelection.UrlSelectorPlugin"/> class.
 /// </summary>
 public UrlSelectorPlugin()
 {
     dataDependent = true;
     description   = "CrawlWave Url Selection Plugin";
     enabled       = true;
     host          = null;
     name          = "CrawlWave.ServerPlugins.UrlSelection";
     percent       = 0;
     settingsPath  = String.Empty;
     state         = PluginState.Stopped;
     version       = Assembly.GetExecutingAssembly().GetName().Version.ToString();
     settings      = PluginSettings.Instance();
     dbcon         = new SqlConnection(settings.DBConnectionString);
     pluginThread  = null;
     mustStop      = false;
     banned        = BannedHostsCache.Instance();
     robots        = RobotsCache.Instance();
 }