WebAssemblyHost.RunAsync 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.
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.