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

Inheritance: IProgressController
Exibir arquivo Open project: SonarSource-VisualStudio/sonarlint-visualstudio Class Usage Examples

Public Methods

Method Description
Create ( IServiceProvider serviceProvider ) : SequentialProgressController

Creates initializes SequentialProgressController

Create ( IServiceProvider serviceProvider, IProgressStepFactory stepFactory ) : SequentialProgressController

Creates initializes SequentialProgressController

GetService ( Type serviceType ) : object

Returns the instance of a service for the specified service type

Initialize ( ) : void

Initializes the controller with a set of ProgressStepDefinition

SequentialProgressController ( IServiceProvider serviceProvider ) : System

Constructs a sequential progress controller

Start ( ) : System.Threading.Tasks.Task

Starts executing the initialized steps. The method is not thread safe but can be called from any thread.

TryAbort ( ) : bool

Attempts to abort the current operation. In case not started or the operation is not cancellable the abort request will be ignored. CanAbort IsStarted

Private Methods

Method Description
ConfigureStepEventListeners ( bool start ) : void
CreateStepOperations ( IEnumerable definitions ) : IEnumerable
Initialize ( IProgressStepFactory factory, IEnumerable stepsDefinition ) : void
OnCancellableChanged ( bool cancellable ) : void
OnFinished ( ProgressControllerResult result ) : void
OnStarted ( ) : void
OnStepStateChanged ( object sender, StepExecutionChangedEventArgs args ) : void
ThreadSafeCancelCancellationTokenSource ( ) : bool
ThreadSafeCreateCancellationTokenSource ( ) : void
ThreadSafeDisposeCancellationTokenSource ( ) : void

Method Details

Create() public static method

Creates initializes SequentialProgressController
public static Create ( IServiceProvider serviceProvider ) : SequentialProgressController
serviceProvider IServiceProvider Service provider instance. Required.
return SequentialProgressController

Create() public static method

Creates initializes SequentialProgressController
public static Create ( IServiceProvider serviceProvider, IProgressStepFactory stepFactory ) : SequentialProgressController
serviceProvider IServiceProvider Service provider instance. Required.
stepFactory IProgressStepFactory to use when create steps from definitions
return SequentialProgressController

GetService() public method

Returns the instance of a service for the specified service type
public GetService ( Type serviceType ) : object
serviceType System.Type The type of the requested service
return object

Initialize() public method

Initializes the controller with a set of ProgressStepDefinition
public Initialize ( ) : void
return void

SequentialProgressController() public method

Constructs a sequential progress controller
public SequentialProgressController ( IServiceProvider serviceProvider ) : System
serviceProvider IServiceProvider Required service provider
return System

Start() public method

Starts executing the initialized steps. The method is not thread safe but can be called from any thread.
public Start ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task

TryAbort() public method

Attempts to abort the current operation. In case not started or the operation is not cancellable the abort request will be ignored. CanAbort IsStarted
public TryAbort ( ) : bool
return bool