Partager via


DispatcherExtensions.DispatchAsync Méthode

Définition

Surcharges

DispatchAsync(IDispatcher, Action)

Planifie l’action fournie sur le thread d’interface utilisateur à partir d’un thread de travail.

DispatchAsync(IDispatcher, Func<Task>)

Planifie la fonction fournie sur le thread d’interface utilisateur à partir d’un thread de travail.

DispatchAsync<T>(IDispatcher, Func<Task<T>>)

Planifie la fonction fournie sur le thread d’interface utilisateur à partir d’un thread de travail.

DispatchAsync<T>(IDispatcher, Func<T>)

Planifie le rappel fourni sur le thread d’interface utilisateur à partir d’un thread de travail et retourne les résultats de manière asynchrone.

DispatchAsync(IDispatcher, Action)

Planifie l’action fournie sur le thread d’interface utilisateur à partir d’un thread de travail.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task ^ DispatchAsync(Microsoft::Maui::Dispatching::IDispatcher ^ dispatcher, Action ^ action);
public static System.Threading.Tasks.Task DispatchAsync (this Microsoft.Maui.Dispatching.IDispatcher dispatcher, Action action);
static member DispatchAsync : Microsoft.Maui.Dispatching.IDispatcher * Action -> System.Threading.Tasks.Task
<Extension()>
Public Function DispatchAsync (dispatcher As IDispatcher, action As Action) As Task

Paramètres

dispatcher
IDispatcher

La IDispatcher instance cette méthode est appelée.

action
Action

Méthode à exécuter par le répartiteur.

Retours

Task.

S’applique à

DispatchAsync(IDispatcher, Func<Task>)

Planifie la fonction fournie sur le thread d’interface utilisateur à partir d’un thread de travail.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task ^ DispatchAsync(Microsoft::Maui::Dispatching::IDispatcher ^ dispatcher, Func<System::Threading::Tasks::Task ^> ^ funcTask);
public static System.Threading.Tasks.Task DispatchAsync (this Microsoft.Maui.Dispatching.IDispatcher dispatcher, Func<System.Threading.Tasks.Task> funcTask);
static member DispatchAsync : Microsoft.Maui.Dispatching.IDispatcher * Func<System.Threading.Tasks.Task> -> System.Threading.Tasks.Task
<Extension()>
Public Function DispatchAsync (dispatcher As IDispatcher, funcTask As Func(Of Task)) As Task

Paramètres

dispatcher
IDispatcher

La IDispatcher instance cette méthode est appelée.

funcTask
Func<Task>

Fonction à exécuter par le répartiteur.

Retours

Task.

S’applique à

DispatchAsync<T>(IDispatcher, Func<Task<T>>)

Planifie la fonction fournie sur le thread d’interface utilisateur à partir d’un thread de travail.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task<T> ^ DispatchAsync(Microsoft::Maui::Dispatching::IDispatcher ^ dispatcher, Func<System::Threading::Tasks::Task<T> ^> ^ funcTask);
public static System.Threading.Tasks.Task<T> DispatchAsync<T> (this Microsoft.Maui.Dispatching.IDispatcher dispatcher, Func<System.Threading.Tasks.Task<T>> funcTask);
static member DispatchAsync : Microsoft.Maui.Dispatching.IDispatcher * Func<System.Threading.Tasks.Task<'T>> -> System.Threading.Tasks.Task<'T>
<Extension()>
Public Function DispatchAsync(Of T) (dispatcher As IDispatcher, funcTask As Func(Of Task(Of T))) As Task(Of T)

Paramètres de type

T

Type retourné par cette méthode.

Paramètres

dispatcher
IDispatcher

La IDispatcher instance cette méthode est appelée.

funcTask
Func<Task<T>>

Fonction à exécuter par le répartiteur.

Retours

Task<T>

Objet Task<TResult> contenant des informations sur l’état de l’opération de répartiteur.

S’applique à

DispatchAsync<T>(IDispatcher, Func<T>)

Planifie le rappel fourni sur le thread d’interface utilisateur à partir d’un thread de travail et retourne les résultats de manière asynchrone.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task<T> ^ DispatchAsync(Microsoft::Maui::Dispatching::IDispatcher ^ dispatcher, Func<T> ^ func);
public static System.Threading.Tasks.Task<T> DispatchAsync<T> (this Microsoft.Maui.Dispatching.IDispatcher dispatcher, Func<T> func);
static member DispatchAsync : Microsoft.Maui.Dispatching.IDispatcher * Func<'T> -> System.Threading.Tasks.Task<'T>
<Extension()>
Public Function DispatchAsync(Of T) (dispatcher As IDispatcher, func As Func(Of T)) As Task(Of T)

Paramètres de type

T

Type retourné par cette méthode.

Paramètres

dispatcher
IDispatcher

La IDispatcher instance cette méthode est appelée.

func
Func<T>

Méthode à exécuter par le répartiteur.

Retours

Task<T>

Objet Task<TResult> contenant des informations sur l’état de l’opération de répartiteur.

S’applique à