private void InvokeCallback(IAsyncResult result) { if (!result.CompletedSynchronously) { AsyncInvokeContext asyncState = (AsyncInvokeContext)result.AsyncState; WorkflowInvoker invoker = asyncState.Invoker; Exception error = null; try { asyncState.Outputs = invoker.EndInvoke(result); } catch (Exception exception2) { if (Fx.IsFatal(exception2)) { throw; } error = exception2; } invoker.PostInvokeCompletedAndRemove(asyncState, error); } }
void InvokeCallback(IAsyncResult result) { if (result.CompletedSynchronously) { return; } AsyncInvokeContext context = (AsyncInvokeContext)result.AsyncState; WorkflowInvoker thisPtr = context.Invoker; Exception error = null; try { context.Outputs = thisPtr.EndInvoke(result); } catch (Exception e) { if (Fx.IsFatal(e)) { throw; } error = e; } thisPtr.PostInvokeCompletedAndRemove(context, error); }