protected virtual void OnWatchItemCompletedAsync(FolderFileEventArgs e) { if (WatchItemCompletedAsync != null) { var eventList = WatchItemCompletedAsync.GetInvocationList(); foreach (EventHandler<FolderFileEventArgs> eventHandler in eventList) { eventHandler.BeginInvoke(null, e, null, null); } } }
private static void FolderWatcher_WatchItemCompleted(object sender, FolderFileEventArgs e) { Console.WriteLine("{0} : {1}",e.WatchType, e.FullPath); }
protected virtual void OnWatchItemCompleted(FolderFileEventArgs e) { WatchItemCompleted?.Invoke(this, e); }