Beispiel #1
0
 private void ProcessFile(object sender, ScanEventArgs e)
 {
   if (e.ContinueRunning)
   {
     using (var stream = File.OpenRead(e.Name))
     {
       var entry = entryFactory_.MakeFileEntry(e.Name);
       outputStream_.PutNextEntry(entry);
       AddFileContents(stream);
     }
   }
 }
Beispiel #2
0
    /// <summary>
    ///   Raise the ProcessFile event.
    /// </summary>
    /// <param name="file">The file name.</param>
    private void OnProcessFile(string file)
    {
      var handler = ProcessFile;

      if (handler != null)
      {
        var args = new ScanEventArgs(file);
        handler(this, args);
        alive_ = args.ContinueRunning;
      }
    }