Beispiel #1
0
        protected WatcherConfiguration(IWatcher watcher)
        {
            if (watcher == null)
            {
                throw new ArgumentNullException(nameof(watcher), "Watcher can not be null.");
            }

            Watcher = watcher;
            Hooks   = WatcherHooksConfiguration.Empty;
        }
            /// <summary>
            /// Configure the hooks that will be common for all of the watchers.
            /// </summary>
            /// <param name="configuration">Configuration of watcher hooks.</param>
            /// <returns>Instance of fluent builder for the IterationProcessorConfiguration.</returns>
            public Builder SetGlobalWatcherHooks(WatcherHooksConfiguration configuration)
            {
                _configuration.GlobalWatcherHooks = configuration;

                return this;
            }
Beispiel #3
0
            /// <summary>
            /// Sets hooks specific for the particular watcher.
            /// </summary>
            /// <param name="hooks">Configuration of the watcher hooks.</param>
            /// <returns>Instance of fluent builder for the WatcherConfiguration.</returns>
            public Builder WithHooks(WatcherHooksConfiguration hooks)
            {
                _configuration.Hooks = hooks;

                return(this);
            }