internal bool PerformTestAsync(string serverToResolve, DelegateTestReporter dtr) { try { this.dtr = dtr; this.callBack = new AsyncCallback(ProcessTestAnswersOfDnsAsync); foreach (string ns in this.lns) { DnsClient.RequestOptions ro = new DnsClient.RequestOptions(); IPAddress result = IPAddress.Loopback; IPAddress.TryParse(ns, out result); if (result == null) { result = IPAddress.Loopback; } ro.DnsServers = new IPAddress[] { result }; DnsRequest dnsRequest = new DnsRequest(); dnsRequest.DnsServerIP = ro.DnsServers; dnsRequest.Url = serverToResolve; Thread.Sleep(Int32.Parse(Math.Ceiling(this.WaitTimeBetweenQueryingDns).ToString())); DnsClient.BeginLookupHost(serverToResolve, DnsClient.IPVersion.IPv4, ro, callBack, dnsRequest); } return(true); } catch { return(false); } }