예제 #1
0
        private void OnFinished(object sender, ProgressControllerFinishedEventArgs e)
        {
            AssertEventHandlerArgsNotNull(sender, e);

            this.executionResult = e.Result;
            // Satisfy the sequential controller verification code
            e.Handled();
        }
예제 #2
0
        private void ControllerFinished(object sender, ProgressControllerFinishedEventArgs e)
        {
            this.IsFinished = true;

            VsThreadingHelper.RunInline(this.serviceProvider, VsTaskRunContext.BackgroundThread, () =>
            {
                // Give the last progress a chance to render
                System.Threading.Thread.Sleep(DelayAfterFinishInMS);
            });
            VsThreadingHelper.RunInline(this.serviceProvider, VsTaskRunContext.UIThreadNormalPriority, () =>
            {
                this.host.Hide();
                ((IDisposable)this).Dispose();
            });
            // Flag that handled to assist with the verification, otherwise the controller will assert
            e.Handled();
        }