public void AddListener(IFileSystemWatchListener fileSystemWatchListener) { Changed += fileSystemWatchListener.OnChange; Created += fileSystemWatchListener.OnCreate; Deleted += fileSystemWatchListener.OnDelete; Renamed += fileSystemWatchListener.OnRename; Error += fileSystemWatchListener.OnError; }
public void RemoveListener(IFileSystemWatchListener fileSystemWatchListener) { Changed -= fileSystemWatchListener.OnChange; Created -= fileSystemWatchListener.OnCreate; Deleted -= fileSystemWatchListener.OnDelete; Renamed -= fileSystemWatchListener.OnRename; Error -= fileSystemWatchListener.OnError; }
public void RemoveListener(IFileSystemWatchListener fileSystemWatchListener) { if (fileSystemWatchListener == null) { return; } Changed -= fileSystemWatchListener.OnChange; Created -= fileSystemWatchListener.OnCreate; Deleted -= fileSystemWatchListener.OnDelete; Renamed -= fileSystemWatchListener.OnRename; Error -= fileSystemWatchListener.OnError; }