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); }
public bool EndWaitForMessage(IAsyncResult result) { return(WaitForMessageAsyncResult.End(result)); }
public static bool End(IAsyncResult result) { WaitForMessageAsyncResult thisPtr = AsyncResult.End <WaitForMessageAsyncResult>(result); return(thisPtr.successResult); }