Ejemplo n.º 1
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            RecipientToIndex recipientToIndex = obj as RecipientToIndex;

            return(recipientToIndex != null && (recipientToIndex.RecipientType == this.RecipientType && string.Compare(recipientToIndex.DisplayName, this.DisplayName, StringComparison.OrdinalIgnoreCase) == 0) && string.Compare(recipientToIndex.EmailAddress, this.EmailAddress, StringComparison.OrdinalIgnoreCase) == 0);
        }
Ejemplo n.º 2
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;
 }
Ejemplo n.º 3
0
        public static GroupExpansionRecipients Parse(string data)
        {
            if (string.IsNullOrEmpty(data))
            {
                throw new ArgumentNullException("data");
            }
            GroupExpansionRecipients groupExpansionRecipients = new GroupExpansionRecipients();

            string[] array = data.Split(new string[]
            {
                "|"
            }, StringSplitOptions.RemoveEmptyEntries);
            foreach (string data2 in array)
            {
                groupExpansionRecipients.Recipients.Add(RecipientToIndex.Parse(data2));
            }
            return(groupExpansionRecipients);
        }