void ProcessFile(object sender, ScanEventArgs e) { if ( (events_ != null) && (events_.ProcessFile != null) ) { events_.ProcessFile(sender, e); } if ( e.ContinueRunning ) { string cleanedName = nameTransform_.TransformFile(e.Name); ZipEntry entry = new ZipEntry(cleanedName); FileInfo info = new FileInfo(e.Name); UpdateEntry(entry, info); outputStream_.PutNextEntry(entry); AddFileContents(e.Name); } }
/// <summary> /// Raise the ProcessFile event. /// </summary> /// <param name="file">The file name.</param> public void OnProcessFile(string file) { if ( ProcessFile != null ) { ScanEventArgs args = new ScanEventArgs(file); ProcessFile(this, args); alive_ = args.ContinueRunning; } }
/// <summary> /// Raises the ProcessFileEvent. /// </summary> /// <param name="file">The file for this event.</param> /// <returns>A boolean indicating if execution should continue or not.</returns> public bool OnProcessFile(string file) { bool result = true; if ( ProcessFile != null ) { ScanEventArgs args = new ScanEventArgs(file); ProcessFile(this, args); result = args.ContinueRunning; } return result; }