Occurs when messages are being scanned.

      Syntax

      public event EventHandler<TEventArgs> Progress

      Remarks

      The ProgressEventArgs object will provide fields that contain the progress information.

      Examples

      Shows how to handle the Progress event.

      using System;
      using ComponentPro.Net.Mail;
      
      ...
      
      static void Main()
      {
          try 
          {
              // Create a new instance of the BounceInspector class. 
              BounceInspector inspector = new BounceInspector();
      
              // Register an event handler. 
              inspector.Progress += inspector_Progress;
      
              // Process all EML files in directory 'c:\\temp'. 
              BounceResultCollection result = inspector.ProcessMessages("c:\\temp");
      
              // Display processed emails. 
              foreach (BounceResult r in result)
              {
                  // If this message was identified as a bounced email message. 
                  if (r.Identified)
                  {
                      // Print out the result 
                      Console.Write("FileName: {0}\nSubject: {1}\nAddress: {2}\nBounce Category: {3}\nBounce Type: {4}\nDeleted: {5}\nDSN Action: {6}\nDSN Diagnostic Code: {7}\n\n",
                                      System.IO.Path.GetFileName(r.FilePath),
                                      r.MailMessage.Subject,
                                      r.Addresses[0],
                                      r.BounceCategory.Name,
                                      r.BounceType.Name,
                                      r.FileDeleted,
                                      r.Dsn.Action,
                                      r.Dsn.DiagnosticCode);
                  }
              }
      
              Console.WriteLine("{0} bounced message found", result.BounceCount);
          }
          catch (Exception exc)
          {
              Console.WriteLine(string.Format("An error occurred: {0}", exc.Message));
          }
      }
      
      /// <summary> 
      /// Handles the BounceInspector's Progress event. 
      /// </summary> 
      /// <param name="sender">The BounceInspector object.</param> 
      /// <param name="e">The event arguments.</param> 
      static void inspector_Progress(object sender, ProgressEventArgs e)
      {
          Console.WriteLine("{0}/{1} message(s) processed, {2}% completed", e.Current, e.Total, e.Percentage);
      }

      Framework

      .NET Compact Framework.NET Compact Framework

      Supported version: 2.0, 3.5, and 3.9
      Assembly: ComponentPro.BounceInspector.CF (in ComponentPro.BounceInspector.CF.dll)

      .NET Framework.NET Framework

      Supported version: 2.0, 3.0, 3.5, 4.0, 4.5.x, 4.6.x and later
      Assembly: ComponentPro.BounceInspector (in ComponentPro.BounceInspector.dll)

      Xamarin AndroidXamarin Android

      Supported version: 2.3 and later
      Assembly: ComponentPro.BounceInspector.Android (in ComponentPro.BounceInspector.Android.dll)

      Xamarin MacXamarin Mac

      Supported version: 2.0.x and later
      Assembly: ComponentPro.BounceInspector.Mac (in ComponentPro.BounceInspector.Mac.dll)

      Xamarin iOSXamarin iOS

      Supported version: 5.1.x and later
      Assembly: ComponentPro.BounceInspector.iOS (in ComponentPro.BounceInspector.iOS.dll)

      See Also