Run() public method

Buffers a call to the underlying action.
public Run ( ) : void
return void
        /// <summary>
        /// Initializes a new instance of the <see cref="ConfigurationFileWatcher"/> class.
        /// </summary>
        /// <param name="path">The path.</param>
        private ConfigurationFileWatcher([NotNull] string path)
        {
            _eventAction = new BufferedAction(WatcherOnChanged, 100);
            Path = path;
            if (!File.Exists(path)) return;

            // ReSharper disable once AssignNullToNotNullAttribute
            _watcher = new FileSystemWatcher(System.IO.Path.GetDirectoryName(path), System.IO.Path.GetFileName(path));
            _watcher.Changed += (s, e) => _eventAction.Run();
            _watcher.NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.Size;
            _watcher.EnableRaisingEvents = true;
        }