Beispiel #1
0
 private static async void helloAsync(HelloPrx hello)
 {
     try
     {
         await hello.sayHelloAsync(5000);
     }
     catch (RequestCanceledException)
     {
         Console.Error.WriteLine("RequestCanceledException");
     }
     catch (Exception ex)
     {
         Console.Error.WriteLine("sayHello AMI call failed:");
         Console.Error.WriteLine(ex);
     }
 }
Beispiel #2
0
 private async void helloAsync(HelloPrx hello)
 {
     try
     {
         await hello.sayHelloAsync(5000);
     }
     catch(AggregateException ae)
     {
         if(ae.InnerException is RequestCanceledException)
         {
             Console.Error.WriteLine("RequestCanceledException");
         }
         else
         {
             Console.Error.WriteLine("sayHello AMI call failed:");
             Console.Error.WriteLine(ae.InnerException);
         }
     }
 }
Beispiel #3
0
 private async void helloAsync(HelloPrx hello)
 {
     try
     {
         await hello.sayHelloAsync(5000);
     }
     catch (AggregateException ae)
     {
         if (ae.InnerException is RequestCanceledException)
         {
             Console.Error.WriteLine("RequestCanceledException");
         }
         else
         {
             Console.Error.WriteLine("sayHello AMI call failed:");
             Console.Error.WriteLine(ae.InnerException);
         }
     }
 }