BlazorWebViewHandler.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.
Calls the specified workItem
asynchronously and passes in the scoped services available to Razor components.
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)
Parameters
- workItem
- Action<IServiceProvider>
The action to call.
Returns
Returns a Task representing true
if the workItem
was called, or false
if it was not called because Blazor is not currently running.
Exceptions
Thrown if workItem
is null
.
Applies to
Met ons samenwerken op GitHub
De bron voor deze inhoud vindt u op GitHub, waar u ook problemen en pull-aanvragen kunt maken en controleren. Bekijk onze gids voor inzenders voor meer informatie.