SonarLint.VisualStudio.Progress.Controller.SequentialProgressController.OnCancellableChanged C# (CSharp) Method

OnCancellableChanged() private method

private OnCancellableChanged ( bool cancellable ) : void
cancellable bool
return void
        private void OnCancellableChanged(bool cancellable)
        {
            if (this.CancellationSupportChangedPrivate != null)
            {
                VsThreadingHelper.RunInline(this, VsTaskRunContext.UIThreadNormalPriority,
                    () =>
                    {
                        var delegates = this.CancellationSupportChangedPrivate;
                        if (delegates != null)
                        {
                            CancellationSupportChangedEventArgs args = new CancellationSupportChangedEventArgs(cancellable);
                            delegates(this, args);
                            // Verify that the observer handled it since now easy way of testing
                            // serialized raising and handling of the event across the classes
                            args.CheckHandled();
                        }
                    });
            }
        }