C# Класс Microsoft.UnitTests.Core.Threading.ControlledTaskScheduler

Наследование: System.Threading.Tasks.TaskScheduler
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
ControlledTaskScheduler ( SynchronizationContext syncContext ) : System
GetAwaiter ( ) : TaskAwaiter
Pause ( ) : IDisposable
Wait ( ) : void

Waits until scheduler queue is empty

WaitForUpcomingTasks ( int ms = 1000 ) : void

Waits for tasks to be scheduled and then until scheduler queue is empty If there are tasks in the queue already, behaves similar to Wait().

Приватные методы

Метод Описание
AfterTaskExecuted ( Task task ) : void
Callback ( Task task ) : void
GetScheduledTasks ( ) : IEnumerable
QueueTask ( Task task ) : void
Resume ( ) : void
TryExecuteTaskInline ( Task task, bool taskWasPreviouslyQueued ) : bool

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

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

public ControlledTaskScheduler ( SynchronizationContext syncContext ) : System
syncContext System.Threading.SynchronizationContext
Результат System

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

public GetAwaiter ( ) : TaskAwaiter
Результат TaskAwaiter

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

public Pause ( ) : IDisposable
Результат IDisposable

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

Waits until scheduler queue is empty
public Wait ( ) : void
Результат void

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

Waits for tasks to be scheduled and then until scheduler queue is empty If there are tasks in the queue already, behaves similar to Wait().
public WaitForUpcomingTasks ( int ms = 1000 ) : void
ms int /// Number of milliseconds to wait until task is scheduled. /// Should be greater than 0. /// Default value is 1000ms. ///
Результат void