private static void Callback(IAsyncResult result) { if (!result.CompletedSynchronously) { GetTokenUIAsyncResult asyncState = (GetTokenUIAsyncResult)result.AsyncState; Exception exception = null; asyncState.CallEnd(result, out exception); asyncState.CallComplete(false, exception); } }
static void Callback(IAsyncResult result) { if (result.CompletedSynchronously) { return; } GetTokenUIAsyncResult outer = (GetTokenUIAsyncResult)result.AsyncState; Exception exception = null; outer.CallEnd(result, out exception); outer.CallComplete(false, exception); }