Esempio n. 1
0
 internal RecipientToIndex(RecipientItemType recipientType, string displayName, string emailAddress)
 {
     if (recipientType != RecipientItemType.To && recipientType != RecipientItemType.Cc && recipientType != RecipientItemType.Bcc)
     {
         throw new ArgumentException("Only TO, CC, and BCC recipient type is supported.");
     }
     if (displayName == null)
     {
         throw new ArgumentNullException("displayName");
     }
     if (emailAddress == null)
     {
         throw new ArgumentNullException("emailAddress");
     }
     this.RecipientType = recipientType;
     this.DisplayName   = RecipientToIndex.SanitizeDisplayName(displayName);
     this.EmailAddress  = emailAddress;
 }