HttpServiceCollectionExtensions.AddHttpContextAccessor Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a default implementation for the 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
Parameters
- services
- IServiceCollection
The IServiceCollection.
Returns
The service collection.