Partilhar via


RazorComponentsServiceCollectionExtensions.AddRazorComponents Método

Definição

Registra os serviços necessários para a renderização do lado do servidor de Componentes 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

Parâmetros

services
IServiceCollection

A coleção de serviços.

Retornos

Um IRazorComponentsBuilder que pode ser usado para configurar ainda mais os serviços de componente razor.

Aplica-se a