TaskScheduler.FromCurrentSynchronizationContext Metodo

Definizione

Crea un TaskScheduler oggetto associato all'oggetto corrente 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

Valori restituiti

Oggetto TaskScheduler associato all'oggetto corrente SynchronizationContext, come determinato da Current.

Eccezioni

L'oggetto SynchronizationContext corrente non può essere utilizzato come TaskScheduler.

Commenti

Tutte le Task istanze accodate all'utilità di pianificazione restituita verranno eseguite tramite una chiamata al Post metodo in tale contesto.

Per altre informazioni, vedere TaskScheduler.

Si applica a

Vedi anche