예제 #1
0
 public void Test_Abandon_After_Dispose()
 {
     using (TestServer server = new TestServer(ServiceName))
     {
         server.Register();
         using (DdeClient client = new DdeClient(ServiceName, TopicName))
         {
             client.Connect();
             client.Pause();
             IAsyncResult ar = client.BeginExecute(CommandText, null, null);
             client.Dispose();
             client.Abandon(ar);
         }
     }
 }
예제 #2
0
 public void Test_Abandon()
 {
     using (TestServer server = new TestServer(ServiceName))
     {
         server.Register();
         using (DdeClient client = new DdeClient(ServiceName, TopicName))
         {
             client.Connect();
             client.Pause();
             IAsyncResult ar = client.BeginExecute(CommandText, null, null);
             Assert.IsFalse(ar.AsyncWaitHandle.WaitOne(Timeout, false));
             client.Abandon(ar);
             client.Resume();
             Assert.IsFalse(ar.AsyncWaitHandle.WaitOne(Timeout, false));
         }
     }
 }
예제 #3
0
 public void Test_Resume_After_Dispose()
 {
     using (TestServer server = new TestServer(ServiceName))
     {
         server.Register();
         using (DdeClient client = new DdeClient(ServiceName, TopicName))
         {
             client.Connect();
             client.Pause();
             client.Dispose();
             client.Resume();
         }
     }
 }
예제 #4
0
 public void Test_IsPaused_Variation_3()
 {
     using (TestServer server = new TestServer(ServiceName))
     {
         server.Register();
         using (DdeClient client = new DdeClient(ServiceName, TopicName))
         {
             client.Connect();
             client.Pause();
             client.Resume();
             Assert.IsFalse(client.IsPaused);
         }
     }
 }