Esempio n. 1
0
        public async Task <IPAddress[]> GetDomainIpAddressesAsync(string domain)
        {
            if (domain == null)
            {
                throw new ArgumentNullException(nameof(domain));
            }

            try {
                return(await domainResolveCache.ThunkifyAsync(NormalizeDomain(domain), Dns.GetHostAddressesAsync));
            } catch (SocketException)
            {
                return(new IPAddress[0]);
            }
        }