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(); }
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(); }