Exemplo n.º 1
0
        private void StartTest(TestStatus test)
        {
            ProcessStatus ps = test as ProcessStatus;

            if (ps != null)
            {
                StartProcess(ps, true);
                return;
            }
            DnsResolveStatus rs = test as DnsResolveStatus;

            if (rs != null)
            {
                StartDnsResolve(rs);
                return;
            }
            MultiProcessStatus mps = test as MultiProcessStatus;

            if (mps != null)
            {
                StartMultiPorcess(mps);
                return;
            }
            Debug.Assert(false);
        }
Exemplo n.º 2
0
 public void DnsTestFinishedThreadSafe(DnsResolveStatus rs)
 {
     if (this.InvokeRequired)
     {
         var myDelegate = new DnsTestFinishedDelegate(DnsTestFinishedThreadSafe);
         this.BeginInvoke(myDelegate, new object[] { rs });
         return;
     }
     rs.Stop();
     NotifyUiTestFinished();
 }
Exemplo n.º 3
0
        private void DnsCallback(IAsyncResult result)
        {
            DnsResolveStatus rs = result.AsyncState as DnsResolveStatus;

            try
            {
                IPAddress[] ips = Dns.EndGetHostAddresses(result);
                rs.IPAddresses = ips;
            }
            catch (Exception ex)
            {
                System.Diagnostics.Trace.WriteLine(ex.ToString());
            }
            DnsTestFinishedThreadSafe(rs);
        }
Exemplo n.º 4
0
 public void DnsTestFinishedThreadSafe(DnsResolveStatus rs)
 {
     if (this.InvokeRequired)
     {
         var myDelegate = new DnsTestFinishedDelegate(DnsTestFinishedThreadSafe);
         this.BeginInvoke(myDelegate, new object[] { rs });
         return;
     }
     rs.Stop();
     NotifyUiTestFinished();
 }
Exemplo n.º 5
0
 private void StartDnsResolve(DnsResolveStatus rs)
 {
     Dns.BeginGetHostAddresses(rs.Hostname, new AsyncCallback(DnsCallback), rs);
 }
Exemplo n.º 6
0
 private void StartDnsResolve(DnsResolveStatus rs)
 {
     Dns.BeginGetHostAddresses(rs.Hostname, new AsyncCallback(DnsCallback), rs);
 }