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(); }
protected Configurator(string url, IHttpRequest request) { Configuration = new WebWatcherConfiguration(url, request); }
public Default(WebWatcherConfiguration configuration) : base(configuration) { SetInstance(this); }
protected Configurator(WebWatcherConfiguration configuration) : base(configuration) { }
/// <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);
/// <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);
/// <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);
/// <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);