Skip to main content

Definition

Assembly: Microsoft.AspNetCore.Components.WebAssembly.dll Namespace: Microsoft.AspNetCore.Components.WebAssembly.Hosting

Syntax

Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostBuilder

Summary

This type is defined in Microsoft.AspNetCore.Components.WebAssembly.

Remarks

See Microsoft documentation for more information about the rest of the API.

Methods

AddBlazorEssentials Extension

Extension method from Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostBuilderExtensions
Registers the necessary services to bootstrap BlazorEssentials, including a ConfigurationBase, AppStateBase, and HttpClientHttpClients</see> for interacting with both the

Syntax

public static Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostBuilder AddBlazorEssentials<TConfiguration, TAppState>(Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostBuilder builder, string configSectionName) where TConfiguration : CloudNimble.EasyAF.Configuration.ConfigurationBase where TAppState : CloudNimble.BlazorEssentials.AppStateBase

Parameters

NameTypeDescription
builderMicrosoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostBuilderThe WebAssemblyHostBuilder instance to configure.
configSectionNamestringThe name of the Configuration node in appsettings.json that specifies BlazorEssentials settings.

Returns

Type: Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostBuilder The

Type Parameters

  • TConfiguration - The ConfigurationBase-derived type to register in the DI container.
  • TAppState - The AppStateBase-derived type to register in the DI container.

AddBlazorEssentials Extension

Extension method from Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostBuilderExtensions

Syntax

public static Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostBuilder AddBlazorEssentials<TConfiguration, TAppState, TMessageHandler>(Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostBuilder builder, string configSectionName) where TConfiguration : CloudNimble.EasyAF.Configuration.ConfigurationBase where TAppState : CloudNimble.BlazorEssentials.AppStateBase where TMessageHandler : System.Net.Http.DelegatingHandler

Parameters

NameTypeDescription
builderMicrosoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostBuilderThe WebAssemblyHostBuilder instance to configure.
configSectionNamestringThe name of the Configuration node in appsettings.json that specifies BlazorEssentials settings.

Returns

Type: Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostBuilder

Type Parameters

  • TConfiguration - The ConfigurationBase-derived type to register in the DI container.
  • TAppState - The AppStateBase-derived type to register in the DI container.
  • TMessageHandler - The DelegatingHandler-derived type to register for the built-in HttpClients. Defaults to BlazorEssentialsAuthorizationMessageHandler1`.

Remarks

If your TMessageHandler needs a constructor, register it before making this call.