C# Class MyTested.AspNetCore.Mvc.ServiceCollectionHttpExtensions

Contains HTTP extension methods for IServiceCollection.
ファイルを表示 Open project: ivaylokenov/MyTested.AspNetCore.Mvc

Public Methods

Method Description
AddHttpContextAccessor ( this serviceCollection ) : IServiceCollection

Adds IHttpContextAccessor with singleton scope to the service collection.

AddStringInputFormatter ( this serviceCollection ) : IServiceCollection

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

Method Details

AddHttpContextAccessor() public static method

Adds IHttpContextAccessor with singleton scope to the service collection.
public static AddHttpContextAccessor ( this serviceCollection ) : IServiceCollection
serviceCollection this Instance of type.
return IServiceCollection

AddStringInputFormatter() public static method

Adds an IInputFormatter which can process "text/plain" media type. Useful for testing with HTTP request body.
public static AddStringInputFormatter ( this serviceCollection ) : IServiceCollection
serviceCollection this Instance of type.
return IServiceCollection