IBlazorWebViewHandler.TryDispatchAsync(Action<IServiceProvider>) Method

Definition

Dispatches work to the scoped services available to Razor components.

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

Parameters

workItem
Action<IServiceProvider>

The work to dispatch.

Returns

A task representing true when the work was dispatched, or false when Blazor is not currently running.

Applies to