WebAssemblyHost.RunAsync Method

Definition

Runs the application associated with this host.

public:
 System::Threading::Tasks::Task ^ RunAsync();
public System.Threading.Tasks.Task RunAsync ();
member this.RunAsync : unit -> System.Threading.Tasks.Task
Public Function RunAsync () As Task

Returns

A Task which represents exit of the application.

Remarks

At this time, it's not possible to shut down a Blazor WebAssembly application using imperative code. The application only stops when the hosting page is reloaded or navigated to another page. As a result the task returned from this method does not complete. This method is not suitable for use in unit-testing.

Applies to