Class ServiceCollectionControllersExtensions
Contains controller extension methods for IServiceCollection.
Inheritance
System.Object
ServiceCollectionControllersExtensions
Namespace:MyTested.AspNetCore.Mvc
Assembly:MyTested.AspNetCore.Mvc.Controllers.dll
Syntax
public static class ServiceCollectionControllersExtensions
Methods
| Improve this Doc View SourceAddActionContextAccessor(IServiceCollection)
Adds Microsoft.AspNetCore.Mvc.Infrastructure.IActionContextAccessor with singleton scope to the service collection.
Declaration
public static IServiceCollection AddActionContextAccessor(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. |
AddControllersTesting(IServiceCollection)
Adds controller testing services.
Declaration
public static IServiceCollection AddControllersTesting(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. |