static void OnAcceptUpgrade(IAsyncResult result) { if (result.CompletedSynchronously) { return; } UpgradeConnectionAsyncResult thisPtr = (UpgradeConnectionAsyncResult)result.AsyncState; Exception completionException = null; try { thisPtr.CompleteAcceptUpgrade(result); } #pragma warning suppress 56500 // Microsoft, transferring exception to another thread catch (Exception e) { if (Fx.IsFatal(e)) { throw; } completionException = e; } thisPtr.Complete(false, completionException); }
public static IConnection EndUpgradeConnection(IAsyncResult result) { // get our upgraded connection return(UpgradeConnectionAsyncResult.End(result)); }
public static IConnection End(IAsyncResult result) { UpgradeConnectionAsyncResult thisPtr = AsyncResult.End <UpgradeConnectionAsyncResult>(result); return(thisPtr.connection); }
public static IConnection EndUpgradeConnection(IAsyncResult result) { return(UpgradeConnectionAsyncResult.End(result)); }