private void Fw_FileCompleted(object sender, FileCompleteEventArgs e) { try { if (fileWatcher.Exists(p => p.FwId == e.FwId)) { var fw = fileWatcher.FirstOrDefault(p => p.FwId.Equals(e.FwId)); fileWatcher.Remove(fw); } } catch { } try { if (files.Contains(e.FileItem.FullPath)) { files.Remove(e.FileItem.FullPath); } } catch { } OnWatchItemCompleted(new FolderFileEventArgs() { FullPath = e.FileItem.FullPath, WatchType = e.FileItem.WatcherType }); OnWatchItemCompletedAsync(new FolderFileEventArgs() { FullPath = e.FileItem.FullPath, WatchType = e.FileItem.WatcherType }); }
protected virtual void OnFileCompleted(FileCompleteEventArgs e) { FileCompleted?.Invoke(this, e); }