public static Address GetAddressesOrDomain(this AddressManagerClient client, MailAddress address, EntityStatus?status) { if (address == null) { throw new ArgumentNullException("address"); } return(client.GetAddressesOrDomain(address.Address, status)); }
internal Address GetAddress(DirectAddress address) { Debug.Assert(m_settings.HasAddressManager); using (AddressManagerClient client = CreateAddressManagerClient()) { if (AddressDomainSearchEnabled(m_settings.AddressManager)) { return(client.GetAddressesOrDomain(address, EntityStatus.Enabled)); } return(client.GetAddress(address, EntityStatus.Enabled)); } }
public static Address GetAddressesOrDomain(this AddressManagerClient client, string emailAddress, EntityStatus?status) { if (string.IsNullOrEmpty(emailAddress)) { throw new ArgumentException("value was null or empty", "emailAddress"); } Address[] addresses = client.GetAddressesOrDomain(new string[] { emailAddress }, status); if (addresses.IsNullOrEmpty()) { return(null); } return(addresses[0]); }
internal Address[] GetAddresses(DirectAddressCollection addresses) { Debug.Assert(m_settings.HasAddressManager); string[] emailAddresses = ( from address in addresses select address.Address ).ToArray(); using (AddressManagerClient client = CreateAddressManagerClient()) { if (AddressDomainSearchEnabled(m_settings.AddressManager)) { return(client.GetAddressesOrDomain(emailAddresses, EntityStatus.Enabled)); } return(client.GetAddresses(emailAddresses, EntityStatus.Enabled)); } }