Exemple #1
0
        protected WebWatcher(string name, WebWatcherConfiguration configuration)
        {
            if (string.IsNullOrEmpty(name))
            {
                throw new ArgumentException("Watcher name can not be empty.");
            }

            if (configuration == null)
            {
                throw new ArgumentNullException(nameof(configuration),
                                                "Web Watcher configuration has not been provided.");
            }

            Name           = name;
            _configuration = configuration;
            _httpService   = configuration.HttpServiceProvider();
        }
Exemple #2
0
 protected Configurator(string url, IHttpRequest request)
 {
     Configuration = new WebWatcherConfiguration(url, request);
 }
Exemple #3
0
 public Default(WebWatcherConfiguration configuration) : base(configuration)
 {
     SetInstance(this);
 }
Exemple #4
0
 protected Configurator(WebWatcherConfiguration configuration) : base(configuration)
 {
 }
Exemple #5
0
 /// <summary>
 /// Factory method for creating a new instance of WebWatcher.
 /// </summary>
 /// <param name="name">Name of the WebWatcher.</param>
 /// <param name="configuration">Configuration of WebWatcher.</param>
 /// <param name="group">Optional name of the group that WebWatcher belongs to.</param>
 /// <returns>Instance of WebWatcher.</returns>
 public static WebWatcher Create(string name, WebWatcherConfiguration configuration, string group = null)
 => new WebWatcher(name, configuration, group);
Exemple #6
0
 /// <summary>
 /// Factory method for creating a new instance of WebWatcher with default name of Web Watcher.
 /// </summary>
 /// <param name="configuration">Configuration of WebWatcher.</param>
 /// <param name="group">Optional name of the group that WebWatcher belongs to.</param>
 /// <returns>Instance of WebWatcher.</returns>
 public static WebWatcher Create(WebWatcherConfiguration configuration, string group = null)
 => Create(DefaultName, configuration, group);
Exemple #7
0
 /// <summary>
 /// Factory method for creating a new instance of WebWatcher.
 /// </summary>
 /// <param name="name">Name of the WebWatcher.</param>
 /// <param name="configuration">Configuration of WebWatcher.</param>
 /// <returns>Instance of WebWatcher.</returns>
 public static WebWatcher Create(string name, WebWatcherConfiguration configuration)
 => new WebWatcher(name, configuration);
Exemple #8
0
 /// <summary>
 /// Factory method for creating a new instance of WebWatcher with default name of Web Watcher.
 /// </summary>
 /// <param name="configuration">Configuration of WebWatcher.</param>
 /// <returns>Instance of WebWatcher.</returns>
 public static WebWatcher Create(WebWatcherConfiguration configuration)
 => Create(DefaultName, configuration);