IBlazorWebViewHandler.TryDispatchAsync(Action<IServiceProvider>) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.