Exemple #1
0
        public void MakeAsynchronousCallWait()
        {
            var proxy = new StateName();
            var asr2 = proxy.BeginGetStateName(1);
            asr2.AsyncWaitHandle.WaitOne();

            proxy.EndGetStateName(asr2).ShouldBe("Alabama");
        }
Exemple #2
0
        public void MakeAsynchronousCallIsCompleted()
        {
            var proxy = new StateName();
            var asr1 = proxy.BeginGetStateName(1);
            while (!asr1.IsCompleted)
                Thread.Sleep(10);

            proxy.EndGetStateName(asr1).ShouldBe("Alabama");
        }
Exemple #3
0
        public void MakeAsynchronousCallWait()
        {
            var proxy = new StateName();
            var asr2  = proxy.BeginGetStateName(1);

            asr2.AsyncWaitHandle.WaitOne();

            proxy.EndGetStateName(asr2).ShouldBe("Alabama");
        }
Exemple #4
0
        public void MakeAsynchronousCallIsCompleted()
        {
            var proxy = new StateName();
            var asr1  = proxy.BeginGetStateName(1);

            while (!asr1.IsCompleted)
            {
                Thread.Sleep(10);
            }

            proxy.EndGetStateName(asr1).ShouldBe("Alabama");
        }
Exemple #5
0
 public void MakeAsynchronousCallWait()
 {
     StateName proxy = new StateName();
       IAsyncResult asr2 = proxy.BeginGetStateName(1);
       asr2.AsyncWaitHandle.WaitOne();
       string ret2 = proxy.EndGetStateName(asr2);
       Assert.AreEqual("Alabama", ret2);
 }
Exemple #6
0
 public void MakeAsynchronousCallIsCompleted()
 {
     StateName proxy = new StateName() ;
       IAsyncResult asr1 = proxy.BeginGetStateName(1);
       while (asr1.IsCompleted == false)
     System.Threading.Thread.Sleep(10);
       string ret1 = proxy.EndGetStateName(asr1);
       Assert.AreEqual("Alabama", ret1);
 }