Freigeben über


Device.InvokeOnMainThreadAsync Methode

Definition

Überlädt

InvokeOnMainThreadAsync(Action)

Ruft einen Action-Delegaten im Hauptthread (der Benutzeroberfläche) des Geräts auf.

InvokeOnMainThreadAsync(Func<Task>)

Ruft eine Funktion im Gerätehauptthread (Benutzeroberfläche) auf.

InvokeOnMainThreadAsync<T>(Func<T>)

Ruft eine Funktion im Gerätehauptthread (Benutzeroberfläche) auf.

InvokeOnMainThreadAsync<T>(Func<Task<T>>)

Ruft eine Funktion im Gerätehauptthread (Benutzeroberfläche) auf.

InvokeOnMainThreadAsync(Action)

Ruft einen Action-Delegaten im Hauptthread (der Benutzeroberfläche) des Geräts auf.

public static System.Threading.Tasks.Task InvokeOnMainThreadAsync(Action action);
static member InvokeOnMainThreadAsync : Action -> System.Threading.Tasks.Task

Parameter

action
System.Action

Der aufzurufende Action-Delegat

Gibt zurück

System.Threading.Tasks.Task

Gilt für:

InvokeOnMainThreadAsync(Func<Task>)

Ruft eine Funktion im Gerätehauptthread (Benutzeroberfläche) auf.

public static System.Threading.Tasks.Task InvokeOnMainThreadAsync(Func<System.Threading.Tasks.Task> funcTask);
static member InvokeOnMainThreadAsync : Func<System.Threading.Tasks.Task> -> System.Threading.Tasks.Task

Parameter

funcTask
System.Func<System.Threading.Tasks.Task>

Die aufzurufende Funktion.

Gibt zurück

System.Threading.Tasks.Task

Gilt für:

InvokeOnMainThreadAsync<T>(Func<T>)

Ruft eine Funktion im Gerätehauptthread (Benutzeroberfläche) auf.

public static System.Threading.Tasks.Task<T> InvokeOnMainThreadAsync<T>(Func<T> func);
static member InvokeOnMainThreadAsync : Func<'T> -> System.Threading.Tasks.Task<'T>

Typparameter

T

Der Rückgabetyp des Func.

Parameter

func
System.Func<T>

Die aufzurufende Funktion.

Gibt zurück

System.Threading.Tasks.Task<T>

Gilt für:

InvokeOnMainThreadAsync<T>(Func<Task<T>>)

Ruft eine Funktion im Gerätehauptthread (Benutzeroberfläche) auf.

public static System.Threading.Tasks.Task<T> InvokeOnMainThreadAsync<T>(Func<System.Threading.Tasks.Task<T>> funcTask);
static member InvokeOnMainThreadAsync : Func<System.Threading.Tasks.Task<'T>> -> System.Threading.Tasks.Task<'T>

Typparameter

T

Der Rückgabetyp des Func.

Parameter

funcTask
System.Func<System.Threading.Tasks.Task<T>>

Die aufzurufende Funktion.

Gibt zurück

System.Threading.Tasks.Task<T>

Gilt für: