Partager via


HttpServiceCollectionExtensions.AddHttpContextAccessor Méthode

Définition

Ajoute une implémentation par défaut pour le IHttpContextAccessor service.

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

Paramètres

services
IServiceCollection

L’IServiceCollectionopérateur

Retours

Collection de services.

S’applique à