BlazorWebView.TryDispatchAsync(Action<IServiceProvider>) Méthode

Définition

Appelle le spécifié workItem de manière asynchrone et transmet les services étendus disponibles pour les composants Razor.

public:
 virtual System::Threading::Tasks::Task<bool> ^ TryDispatchAsync(Action<IServiceProvider ^> ^ workItem);
public virtual System.Threading.Tasks.Task<bool> TryDispatchAsync (Action<IServiceProvider> workItem);
abstract member TryDispatchAsync : Action<IServiceProvider> -> System.Threading.Tasks.Task<bool>
override this.TryDispatchAsync : Action<IServiceProvider> -> System.Threading.Tasks.Task<bool>
Public Overridable Function TryDispatchAsync (workItem As Action(Of IServiceProvider)) As Task(Of Boolean)

Paramètres

workItem
Action<IServiceProvider>

Action à appeler.

Retours

Retourne un Task représentant true si a workItem été appelé ou false s’il n’a pas été appelé, car Blazor n’est pas en cours d’exécution.

Exceptions

Levée si workItem a la valeur null.

S’applique à