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

            if (string.IsNullOrEmpty(watcher.Name))
                throw new ArgumentException("Watcher name can not be empty.");

            WatcherName = watcher.Name;
            WatcherType = watcher.GetType();
        }
Beispiel #2
0
        protected WatcherCheck(IWatcher watcher)
        {
            if (watcher == null)
            {
                throw new ArgumentNullException(nameof(watcher), "Watcher can not be null.");
            }

            if (string.IsNullOrEmpty(watcher.Name))
            {
                throw new ArgumentException("Watcher name can not be empty.");
            }

            WatcherName = watcher.Name;
            WatcherType = watcher.GetType();
        }