RazorComponentsServiceCollectionExtensions.AddRazorComponents Метод

Определение

Регистрирует службы, необходимые для отрисовки компонентов 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

Параметры

services
IServiceCollection

Коллекция служб.

configure
Action<RazorComponentsServiceOptions>

Действие Action<T> для настройки предоставленного объекта RazorComponentsServiceOptions.

Возвращаемое значение

Объект , IRazorComponentsBuilder который можно использовать для дальнейшей настройки служб компонентов Razor.

Применяется к