Beispiel #1
0
            static void OnWaitForMessageComplete(object state)
            {
                WaitForMessageAsyncResult thisPtr = (WaitForMessageAsyncResult)state;
                Exception completionException     = null;

                try
                {
                    thisPtr.SetReturnValue(thisPtr.Source.EndWaitForMessage());
                }
#pragma warning suppress 56500 // Microsoft, transferring exception to another thread
                catch (Exception e)
                {
                    if (Fx.IsFatal(e))
                    {
                        throw;
                    }

                    completionException = e;
                }
                thisPtr.CompleteWithUnlock(false, completionException);
            }
Beispiel #2
0
 public bool EndWaitForMessage(IAsyncResult result)
 {
     return(WaitForMessageAsyncResult.End(result));
 }
Beispiel #3
0
            public static bool End(IAsyncResult result)
            {
                WaitForMessageAsyncResult thisPtr = AsyncResult.End <WaitForMessageAsyncResult>(result);

                return(thisPtr.successResult);
            }