TaskScheduler.FromCurrentSynchronizationContext Metoda

Definice

Vytvoří přidruženou TaskScheduler k aktuálnímu SynchronizationContext.

public:
 static System::Threading::Tasks::TaskScheduler ^ FromCurrentSynchronizationContext();
public static System.Threading.Tasks.TaskScheduler FromCurrentSynchronizationContext();
static member FromCurrentSynchronizationContext : unit -> System.Threading.Tasks.TaskScheduler
Public Shared Function FromCurrentSynchronizationContext () As TaskScheduler

Návraty

Přidruženo TaskScheduler k aktuálnímu SynchronizationContext, jak je určeno Current.

Výjimky

Aktuální SyncContext nelze použít jako taskScheduler.

Poznámky

Všechny Task instance zařazené do vráceného plánovače se spustí prostřednictvím volání Post metody v tomto kontextu.

Další informace najdete na webu TaskScheduler.

Platí pro

Viz také