Exemple #1
0
        public static MailAddress ToMailAddress(this EmailAddressEmbedded address)
        {
            if (address.DisplayName != null)
            {
                return(new MailAddress(address.EmailAddress, address.DisplayName));
            }

            return(new MailAddress(address.EmailAddress));
        }
Exemple #2
0
        public static EmailAddress ToEmailAddress(this EmailAddressEmbedded address)
        {
            if (address.DisplayName.HasText())
            {
                return(new EmailAddress(address.DisplayName, address.EmailAddress));
            }

            return(new EmailAddress(address.EmailAddress));
        }
 public static Recipient ToRecipient(this EmailAddressEmbedded address)
 {
     return(new Recipient
     {
         EmailAddress = new EmailAddress
         {
             Address = address.EmailAddress,
             Name = address.DisplayName
         }
     });
 }