SonarLint.VisualStudio.Progress.Controller.DeterminateStepProgressNotifier.NotifyCurrentProgress C# (CSharp) Method

NotifyCurrentProgress() public method

Notifies the progress without incrementing the progress.
IProgressStepExecutionEvents.ProgressChanged(string, double)
public NotifyCurrentProgress ( string message ) : void
message string
return void
        public void NotifyCurrentProgress(string message)
        {
            this.executionEvents.ProgressChanged(message, this.GetCurrentProgress());
        }

Usage Example

        public void DeterminateStepProgressNotifier_NotifyCurrentProgress()
        {
            // Setup
            var controller = new ConfigurableProgressController(null);
            const int Steps = 2;
            var testSubject = new DeterminateStepProgressNotifier(controller, Steps);
            List<Tuple<string, double>> expectedProgress = new List<Tuple<string, double>>();

            // Act + Verify
            for (int i = 0; i < Steps; i++)
            {
                expectedProgress.Add(Tuple.Create("hello world " + i, 0.0));
                testSubject.NotifyCurrentProgress(expectedProgress.Last().Item1);

                Assert.AreEqual(0, testSubject.CurrentValue, "Should not change");
                controller.AssertProgressChangeEvents(expectedProgress);
            }
        }
All Usage Examples Of SonarLint.VisualStudio.Progress.Controller.DeterminateStepProgressNotifier::NotifyCurrentProgress