C# Class SonarLint.VisualStudio.Progress.Controller.DeterminateStepProgressNotifier

A helper class that wraps the notifications for determinate step.
Show file Open project: SonarSource-VisualStudio/sonarlint-visualstudio Class Usage Examples

Private Properties

Property Type Description
GetCurrentProgress double

Public Methods

Method Description
DeterminateStepProgressNotifier ( IProgressStepExecutionEvents executionEvents, int numberOfIncrements ) : System

Creates an instance of DeterminateStepProgressNotifier

IncrementProgress ( int increment = 1 ) : void

Advances the progress by an increment. The progress needs to remain in valid range for this to succeed.

NotifyCurrentProgress ( string message ) : void

Notifies the progress without incrementing the progress.

IProgressStepExecutionEvents.ProgressChanged(string, double)

NotifyIncrementedProgress ( string message, int increment = 1 ) : void

Increments and notifies the progress with a message

Private Methods

Method Description
GetCurrentProgress ( ) : double

Method Details

DeterminateStepProgressNotifier() public method

Creates an instance of DeterminateStepProgressNotifier
public DeterminateStepProgressNotifier ( IProgressStepExecutionEvents executionEvents, int numberOfIncrements ) : System
executionEvents IProgressStepExecutionEvents Required
numberOfIncrements int The number of predefined increments to the progress, at least one is expected.
return System

IncrementProgress() public method

Advances the progress by an increment. The progress needs to remain in valid range for this to succeed.
public IncrementProgress ( int increment = 1 ) : void
increment int 1 by default
return void

NotifyCurrentProgress() public method

Notifies the progress without incrementing the progress.
IProgressStepExecutionEvents.ProgressChanged(string, double)
public NotifyCurrentProgress ( string message ) : void
message string
return void

NotifyIncrementedProgress() public method

Increments and notifies the progress with a message
public NotifyIncrementedProgress ( string message, int increment = 1 ) : void
message string
increment int
return void