Partager via


RazorComponentsServiceCollectionExtensions.AddRazorComponents Méthode

Définition

Inscrit les services requis pour le rendu côté serveur des composants Razor.

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

Paramètres

services
IServiceCollection

Collection de services.

Retours

IRazorComponentsBuilder qui peut être utilisé pour configurer davantage les services de composant Razor.

S’applique à