コード例 #1
0
        protected void OnRunCompleted(object sender, RunCompletedEventArgs e)
        {
            RunCompletedEventHandler runCompletedEvent = this.RunCompletedEvent;

            if (runCompletedEvent != null)
            {
                runCompletedEvent(this, e);
            }
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        private void Completed(object operationState)
        {
            RunCompletedEventArgs e = (RunCompletedEventArgs)operationState;

            this.OnRunCompleted(this, e);
        }