Advtools.AdvInterceptor.State.GetDns C# (CSharp) Method

GetDns() private method

private GetDns ( ) : AdvDnsClient
return AdvDnsClient
        private AdvDnsClient GetDns()
        {
            string ip = Config.Dns.Server;
            int timeout = Config.Dns.Timeout;

            if(string.IsNullOrWhiteSpace(ip))
            {
                Logger.Config("Take the default DNS configured on this host");
                return new AdvDnsClient(DnsClient.Default);
            }

            Logger.Config("Take the configured DNS: {0} with timeout {1}", ip, timeout);
            return new AdvDnsClient(IPAddress.Parse(ip), timeout);
        }