Example #1
0
        public string GetIP(string domain)
        {
            bool isIp = KK.IsIP(domain);

            logger.InfoFormat("domain#{0} IsIP = {1}", domain, isIp);

            if (isIp)
            {
                return(domain);
            }

            IPHostEntry hostEntry  = Dns.GetHostEntry(domain);
            IPEndPoint  ipEndPoint = new IPEndPoint(hostEntry.AddressList[0], 0);

            return(ipEndPoint.Address.ToString());
        }