private void WatcherOnError(object sender, FileSystemErrorEventArgs errorEventArgs) { // Not sure if we have something to do with the errors, so don't log them for now var watcher = sender as IFileSystemWatcher; // Site.Trace($"Expection occured for directory watcher [{watcher?.Path}]: {errorEventArgs.GetException().GetReason()}"); }
/// <summary> /// Raises the <see cref="Error"/> event. /// </summary> /// <param name="args">Arguments for the event.</param> public void RaiseError(FileSystemErrorEventArgs args) { Error?.Invoke(this, args); }
private void OnError(object sender, FileSystemErrorEventArgs args) { RaiseError(args); }
/// <summary> /// Raise the <see cref="IFileSystemWatcher.Error"/> event on watchers. /// </summary> /// <param name="exception">Exception that occurred.</param> public void RaiseError(Exception exception) { var args = new FileSystemErrorEventArgs(exception); Dispatch(args, (w, a) => w.RaiseError(a), false); }