Compartir a través de


Device.InvokeOnMainThreadAsync Método

Definición

Sobrecargas

InvokeOnMainThreadAsync(Action)

Invoca una acción en el subproceso principal del dispositivo (UI).

InvokeOnMainThreadAsync(Func<Task>)

Invoca una función Func en el subproceso principal del dispositivo (UI).

InvokeOnMainThreadAsync<T>(Func<T>)

Invoca una función Func en el subproceso principal del dispositivo (UI).

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

Invoca una función Func en el subproceso principal del dispositivo (UI).

InvokeOnMainThreadAsync(Action)

Invoca una acción en el subproceso principal del dispositivo (UI).

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

Parámetros

action
System.Action

Acción que se va a invocar.

Devoluciones

System.Threading.Tasks.Task

Se aplica a

InvokeOnMainThreadAsync(Func<Task>)

Invoca una función Func en el subproceso principal del dispositivo (UI).

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

Parámetros

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

Func que se va a invocar.

Devoluciones

System.Threading.Tasks.Task

Se aplica a

InvokeOnMainThreadAsync<T>(Func<T>)

Invoca una función Func en el subproceso principal del dispositivo (UI).

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

Parámetros de tipo

T

Tipo de valor devuelto de Func.

Parámetros

func
System.Func<T>

Func que se va a invocar.

Devoluciones

System.Threading.Tasks.Task<T>

Se aplica a

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

Invoca una función Func en el subproceso principal del dispositivo (UI).

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>

Parámetros de tipo

T

Tipo de valor devuelto de Func.

Parámetros

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

Func que se va a invocar.

Devoluciones

System.Threading.Tasks.Task<T>

Se aplica a