C# Class Testeroids.TplTestPlatformHelper.TestTaskScheduler

Provides a task scheduler that runs tasks only on the current thread, and records the order in which Tasks were queued using QueueTask.
Inheritance: System.Threading.Tasks.TaskScheduler
Afficher le fichier Open project: Testeroids/Testeroids Class Usage Examples

Private Properties

Свойство Type Description

Méthodes publiques

Méthode Description
TestTaskScheduler ( bool executeTplTasks ) : System

Initializes a new instance of the TestTaskScheduler class.

Méthodes protégées

Méthode Description
GetScheduledTasks ( ) : IEnumerable

Gets the Tasks currently scheduled to this scheduler.

QueueTask ( System.Threading.Tasks.Task task ) : void

Runs the provided Task synchronously on the current thread.

TryExecuteTaskInline ( System.Threading.Tasks.Task task, bool taskWasPreviouslyQueued ) : bool

Runs the provided Task synchronously on the current thread.

Method Details

GetScheduledTasks() protected méthode

Gets the Tasks currently scheduled to this scheduler.
protected GetScheduledTasks ( ) : IEnumerable
Résultat IEnumerable

QueueTask() protected méthode

Runs the provided Task synchronously on the current thread.
protected QueueTask ( System.Threading.Tasks.Task task ) : void
task System.Threading.Tasks.Task The task to be executed.
Résultat void

TestTaskScheduler() public méthode

Initializes a new instance of the TestTaskScheduler class.
public TestTaskScheduler ( bool executeTplTasks ) : System
executeTplTasks bool /// Setting this field to false will prevent any queued task from starting. ///
Résultat System

TryExecuteTaskInline() protected méthode

Runs the provided Task synchronously on the current thread.
protected TryExecuteTaskInline ( System.Threading.Tasks.Task task, bool taskWasPreviouslyQueued ) : bool
task System.Threading.Tasks.Task The task to be executed.
taskWasPreviouslyQueued bool Whether the Task was previously queued to the scheduler.
Résultat bool