C# Class SonarLint.VisualStudio.Progress.UnitTests.SingleThreadedTaskSchedulerService

Test implementation of IVsTaskSchedulerService which runs all the tasks on the same thread as the calling code
Inheritance: SVsTaskSchedulerService, IVsTaskSchedulerService
显示文件 Open project: SonarSource-VisualStudio/sonarlint-visualstudio Class Usage Examples

Public Methods

Method Description
RunInUIContext ( System.Action action ) : void

Test helper to run test code in a pseudo-UI context that will let the platform code to behave nicely

SetCurrentThreadIsUIThread ( bool uiThread ) : void
SingleThreadedTaskSchedulerService ( ) : Microsoft.VisualStudio.Shell

Private Methods

Method Description
IVsTaskSchedulerService ( uint context, IVsTaskBody taskBody ) : IVsTask
IVsTaskSchedulerService ( uint context, uint tasks, IVsTask dependentTasks, IVsTaskBody taskBody ) : IVsTask
IVsTaskSchedulerService ( uint context, uint tasks, IVsTask dependentTasks, uint options, IVsTaskBody taskBody, object asyncState ) : IVsTask
IVsTaskSchedulerService ( uint context, uint options, IVsTaskBody taskBody, object asyncState ) : IVsTask
IVsTaskSchedulerService ( ) : IVsTaskCompletionSource
IVsTaskSchedulerService ( uint options, object asyncState ) : IVsTaskCompletionSource
SetCurrentThreadContextAs ( VsTaskRunContext context ) : void

Simulates the current thread as the specified context when ThreadHelper.CheckAccess is used

Method Details

RunInUIContext() public method

Test helper to run test code in a pseudo-UI context that will let the platform code to behave nicely
public RunInUIContext ( System.Action action ) : void
action System.Action The action to run
return void

SetCurrentThreadIsUIThread() public method

public SetCurrentThreadIsUIThread ( bool uiThread ) : void
uiThread bool
return void

SingleThreadedTaskSchedulerService() public method

public SingleThreadedTaskSchedulerService ( ) : Microsoft.VisualStudio.Shell
return Microsoft.VisualStudio.Shell