protected void OnRunCompleted(object sender, RunCompletedEventArgs e) { RunCompletedEventHandler runCompletedEvent = this.RunCompletedEvent; if (runCompletedEvent != null) { runCompletedEvent(this, e); } }
private void CompletionMethod(Exception exc, bool canceled, AsyncOperation asyncOp) { if (!canceled) { object syncRoot = this.userStateToLifetime.SyncRoot; ObjectFlowControl.CheckForSyncLockOnValueType(syncRoot); lock (syncRoot) { this.userStateToLifetime.Remove(RuntimeHelpers.GetObjectValue(asyncOp.UserSuppliedState)); } } RunCompletedEventArgs arg = new RunCompletedEventArgs(exc, canceled, RuntimeHelpers.GetObjectValue(asyncOp.UserSuppliedState)); this._isBusy = false; asyncOp.PostOperationCompleted(this.onCompletedDelegate, arg); }
private void Completed(object operationState) { RunCompletedEventArgs e = (RunCompletedEventArgs)operationState; this.OnRunCompleted(this, e); }