NET Email Validation
IsBusy Property
Example 






KellermanSoftware.NetEmailValidation Namespace > EmailValidation Class : IsBusy Property
If true, we are actively validating emails.
Syntax
'Declaration
 
Public Property IsBusy As System.Boolean
'Usage
 
Dim instance As EmailValidation
Dim value As System.Boolean
 
instance.IsBusy = value
 
value = instance.IsBusy
public System.bool IsBusy {get; set;}
public read-write property IsBusy: System.Boolean; 
public function get,set IsBusy : System.boolean
public: __property System.bool get_IsBusy();
public: __property void set_IsBusy( 
   System.bool value
);
public:
property System.bool IsBusy {
   System.bool get();
   void set (    System.bool value);
}
Example
EmailValidation emailValidator = new EmailValidation(); //Trial Mode
//EmailValidation emailValidator = new EmailValidation("place user name here", "place license key here"); //License Mode
     
emailValidator.FromEmail = "someone@somewhere.com";
emailValidator.FromMailServer = "mail.somewhere.com";
 
//Create a list of 100 email addresses
List<string> emailAddresses = new List<string>();
 
for (int i = 1; i <= 100; i++)
    emailAddresses.Add(string.Format("johnsmith{0}@hotmail.com", i));
 
//Begin asynchronous validation
emailValidator.ValidateListAsync(emailAddresses);
 
while (emailValidator.IsBusy)
{
    Console.WriteLine(string.Format("{0} of {1}", emailValidator.EmailsProcessed,emailValidator.TotalEmailsToProcess));
 
    //Sleep 1 second
    System.Threading.Thread.Sleep(1000);
}
Dim emailValidator As EmailValidation = New EmailValidation() 'Trial Mode
'Dim emailValidator As EmailValidation = New EmailValidation("place user name here", "place license key here") 'License Mode
 
emailValidator.FromEmail = "someone@somewhere.com"
emailValidator.FromMailServer = "mail.somewhere.com"
 
'Create a list of 100 email addresses
Dim emailAddresses As List(Of String) = New List(Of String)()
 
For i As Integer = 1 To 100
    emailAddresses.Add(String.Format("johnsmith{0}@hotmail.com", i))
Next i
 
'Begin asynchronous validation
emailValidator.ValidateListAsync(emailAddresses)
 
Do While emailValidator.IsBusy
    Console.WriteLine(String.Format("{0} of {1}", emailValidator.EmailsProcessed,emailValidator.TotalEmailsToProcess))
 
    'Sleep 1 second
    System.Threading.Thread.Sleep(1000)
Loop
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

EmailValidation Class
EmailValidation Members