SonarLint.VisualStudio.Progress.Controller.ProgressEventArgs.CheckHandled C# (CSharp) Method

CheckHandled() private method

private CheckHandled ( ) : void
return void
        internal void CheckHandled()
        {
            Debug.WriteLine("The event arguments {0} were handled by {1} handlers", this.GetType().FullName, this.handled);
            Debug.Assert(this.handled > 0, "Caught unhandled event which was supposed to be handled", "Arguments type: {0}", this.GetType().FullName);
        }
    }

Usage Example

Example #1
0
        private void OnStarted()
        {
            this.IsStarted = true;
            this.ThreadSafeCreateCancellationTokenSource();

            VsThreadingHelper.RunInline(this, VsTaskRunContext.UIThreadNormalPriority, () =>
            {
                ConfigureStepEventListeners(true);

                var delegates = this.StartedPrivate;
                if (delegates != null)
                {
                    ProgressEventArgs args = new ProgressEventArgs();
                    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();
                }
            });
        }
All Usage Examples Of SonarLint.VisualStudio.Progress.Controller.ProgressEventArgs::CheckHandled
ProgressEventArgs