C# Класс 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.
Наследование: System.Threading.Tasks.TaskScheduler
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание

Открытые методы

Метод Описание
TestTaskScheduler ( bool executeTplTasks ) : System

Initializes a new instance of the TestTaskScheduler class.

Защищенные методы

Метод Описание
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.

Описание методов

GetScheduledTasks() защищенный Метод

Gets the Tasks currently scheduled to this scheduler.
protected GetScheduledTasks ( ) : IEnumerable
Результат IEnumerable

QueueTask() защищенный Метод

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.
Результат void

TestTaskScheduler() публичный Метод

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. ///
Результат System

TryExecuteTaskInline() защищенный Метод

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.
Результат bool