private void OnCompleteFile(string file) { CompletedFileHandler completedFile = CompletedFile; if (completedFile != null) { ScanEventArgs e = new ScanEventArgs(file); completedFile(this, e); alive_ = e.ContinueRunning; } }
public bool OnCompletedFile(string file) { bool continueRunning = true; CompletedFileHandler completedFile = CompletedFile; if (completedFile != null) { ScanEventArgs e = new ScanEventArgs(file); completedFile(this, e); continueRunning = e.ContinueRunning; } return continueRunning; }
private void OnProcessFile(string file) { ProcessFileHandler processFile = ProcessFile; if (processFile != null) { ScanEventArgs e = new ScanEventArgs(file); processFile(this, e); alive_ = e.ContinueRunning; } }
public bool OnProcessFile(string file) { bool continueRunning = true; ProcessFileHandler processFile = ProcessFile; if (processFile != null) { ScanEventArgs e = new ScanEventArgs(file); processFile(this, e); continueRunning = e.ContinueRunning; } return continueRunning; }
private void ProcessFile(object sender, ScanEventArgs e) { if ((events_ != null) && (events_.ProcessFile != null)) { events_.ProcessFile(sender, e); } if (e.ContinueRunning) { try { using (FileStream stream = File.Open(e.Name, FileMode.Open, FileAccess.Read, FileShare.Read)) { ZipEntry entry = entryFactory_.MakeFileEntry(e.Name); outputStream_.PutNextEntry(entry); AddFileContents(e.Name, stream); } } catch (Exception exception) { if (events_ == null) { continueRunning_ = false; throw; } continueRunning_ = events_.OnFileFailure(e.Name, exception); } } }