MY TESTED ASP.NET CORE MVC DOCS
Show / Hide Table of Contents

Class ServiceCollectionHttpExtensions

Contains HTTP extension methods for IServiceCollection.

Inheritance
System.Object
ServiceCollectionHttpExtensions
Namespace:MyTested.AspNetCore.Mvc
Assembly:MyTested.AspNetCore.Mvc.Http.dll
Syntax
public static class ServiceCollectionHttpExtensions

Methods

| Improve this Doc View Source

AddHttpContextAccessor(IServiceCollection)

Adds Microsoft.AspNetCore.Http.IHttpContextAccessor with singleton scope to the service collection.

Declaration
public static IServiceCollection AddHttpContextAccessor(this IServiceCollection serviceCollection)
Parameters
Type Name Description
Microsoft.Extensions.DependencyInjection.IServiceCollection serviceCollection

Instance of IServiceCollection type.

Returns
Type Description
Microsoft.Extensions.DependencyInjection.IServiceCollection

The same IServiceCollection.

| Improve this Doc View Source

AddStringInputFormatter(IServiceCollection)

Adds an Microsoft.AspNetCore.Mvc.Formatters.IInputFormatter which can process "text/plain" media type. Useful for testing with HTTP request body.

Declaration
public static IServiceCollection AddStringInputFormatter(this IServiceCollection serviceCollection)
Parameters
Type Name Description
Microsoft.Extensions.DependencyInjection.IServiceCollection serviceCollection

Instance of IServiceCollection type.

Returns
Type Description
Microsoft.Extensions.DependencyInjection.IServiceCollection

The same IServiceCollection.

  • Improve this Doc
  • View Source
Back to top Copyright © 2015-2016 MyTestedASP.NET. All Rights Reserved. Generated by DocFX