Beispiel #1
0
 public void OnCompleted_1()
 {
     try {
         a.OnCompleted(null);
         Assert.Fail("#1");
     } catch (ArgumentException) {
     }
 }
Beispiel #2
0
 public void OnCompleted_1()
 {
     try
     {
         _a.OnCompleted(null);
         Assert.Fail("#1");
     }
     catch (ArgumentException ex)
     {
         GC.KeepAlive(ex);
     }
 }
 public void OnCompleted_1()
 {
     try
     {
         _a.OnCompleted(null);
         Assert.Fail("#1");
     }
     catch (ArgumentException ex)
     {
         Theraot.No.Op(ex);
     }
 }
Beispiel #4
0
 public void OnCompleted(Action continuation)
 {
     if (_continueOnCapturedContext)
     {
         // Pass through to the YieldAwaiter, which always continues on the captured context
         _awaiter.OnCompleted(continuation);
     }
     else
     {
         // Schedule the continuation directly on the thread pool
         ThreadPool.QueueUserWorkItem(s_runContinuation, continuation);
     }
 }