public void Constructor_ValidatesComponentType_Success()
    {
        // Arrange
        // Act
        var mapping = new RootComponentMapping(typeof(Router), "test");

        // Assert (does not throw)
        GC.KeepAlive(mapping);
    }
Beispiel #2
0
 /// <summary>
 ///  Installs a LoadingBar service to the runtime hosting environment.
 /// </summary>
 /// <param name="hostBuilder">The Microsoft.AspNetCore.Blazor.Hosting.WebAssemblyHostBuilder.</param>
 public static WebAssemblyHostBuilder UseLoadingBar(this WebAssemblyHostBuilder hostBuilder)
 {
     if (!Installed)
     {
         var mapping = new RootComponentMapping(typeof(ScriptInjectorComponent), "script[src]");
         hostBuilder.RootComponents.Insert(0, mapping);
     }
     Installed = true;
     return(hostBuilder);
 }
Beispiel #3
0
 public Module()
 {
     RootComponentMapping = new RootComponentMapping(typeof(App), "app");
 }