RazorComponentsServiceCollectionExtensions.AddRazorComponents Metoda

Definice

Registruje služby potřebné pro vykreslování komponent Razor na straně serveru.

public static Microsoft.Extensions.DependencyInjection.IRazorComponentsBuilder AddRazorComponents (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.Components.Endpoints.RazorComponentsServiceOptions>? configure = default);
static member AddRazorComponents : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.Components.Endpoints.RazorComponentsServiceOptions> -> Microsoft.Extensions.DependencyInjection.IRazorComponentsBuilder
<Extension()>
Public Function AddRazorComponents (services As IServiceCollection, Optional configure As Action(Of RazorComponentsServiceOptions) = Nothing) As IRazorComponentsBuilder

Parametry

services
IServiceCollection

Kolekce služby.

configure
Action<RazorComponentsServiceOptions>

Pro Action<T> konfiguraci zadaného RazorComponentsServiceOptionsobjektu .

Návraty

Slouží IRazorComponentsBuilder k další konfiguraci služeb komponent Razor.

Platí pro