Ejemplo n.º 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();
        }
Ejemplo n.º 2
0
 protected Configurator(string url, IHttpRequest request)
 {
     Configuration = new WebWatcherConfiguration(url, request);
 }
Ejemplo n.º 3
0
 public Default(WebWatcherConfiguration configuration) : base(configuration)
 {
     SetInstance(this);
 }
Ejemplo n.º 4
0
 protected Configurator(WebWatcherConfiguration configuration) : base(configuration)
 {
 }
Ejemplo n.º 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);
Ejemplo n.º 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);
Ejemplo n.º 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);
Ejemplo n.º 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);