コード例 #1
0
        public static Address GetAddressesOrDomain(this AddressManagerClient client, MailAddress address, EntityStatus?status)
        {
            if (address == null)
            {
                throw new ArgumentNullException("address");
            }

            return(client.GetAddressesOrDomain(address.Address, status));
        }
コード例 #2
0
ファイル: ConfigService.cs プロジェクト: wwj229/nhin-d.net35
        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));
            }
        }
コード例 #3
0
        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]);
        }
コード例 #4
0
ファイル: ConfigService.cs プロジェクト: wwj229/nhin-d.net35
        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));
            }
        }