private void completionMethod(object data, Exception ex, bool cancelled, AsyncOperation asyncOp) { if (!cancelled) { lock (userStateToLifetime) { userStateToLifetime.Remove(asyncOp.UserSuppliedState); } var e = new OperationCompletedEventArgs(data, ex, cancelled, asyncOp.UserSuppliedState); asyncOp.PostOperationCompleted(onCompletedCallback, e); } }
protected void onOperationCompleted(OperationCompletedEventArgs e) { if (this.DataCommitCompleted != null) DataCommitCompleted(this, e); }