Compartilhar via


HttpServiceCollectionExtensions.AddHttpContextAccessor Método

Definição

Adiciona uma implementação padrão para o IHttpContextAccessor serviço.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddHttpContextAccessor (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddHttpContextAccessor : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddHttpContextAccessor (services As IServiceCollection) As IServiceCollection

Parâmetros

Retornos

A coleção de serviços.

Aplica-se a