parent
81af619cf7
commit
257d202a14
|
|
@ -30,10 +30,21 @@ namespace Microsoft.Extensions.DependencyInjection
|
||||||
public static class MvcCoreServiceCollectionExtensions
|
public static class MvcCoreServiceCollectionExtensions
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds essential MVC services to the specified <see cref="IServiceCollection" />.
|
/// Adds the minimum essential MVC services to the specified <see cref="IServiceCollection" />. Addtional services
|
||||||
|
/// including MVC's support for authorization, formatters, and validation must be added separately using the
|
||||||
|
/// <see cref="IMvcCoreBuilder"/> returned from this method.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="services">The <see cref="IServiceCollection" /> to add services to.</param>
|
/// <param name="services">The <see cref="IServiceCollection" /> to add services to.</param>
|
||||||
/// <returns>An <see cref="IMvcCoreBuilder"/> that can be used to further configure the MVC services.</returns>
|
/// <returns>An <see cref="IMvcCoreBuilder"/> that can be used to further configure the MVC services.</returns>
|
||||||
|
/// <remarks>
|
||||||
|
/// The <see cref="MvcCoreServiceCollectionExtensions.AddMvcCore(IServiceCollection)"/> approach for configuring
|
||||||
|
/// MVC is provided for experienced MVC developers who wish to have full control over the set of default services
|
||||||
|
/// registered. <see cref="MvcCoreServiceCollectionExtensions.AddMvcCore(IServiceCollection)"/> will register
|
||||||
|
/// the minimum set of services necessary to route requests and invoke controllers. It is not expected that any
|
||||||
|
/// application will satisfy its requirements with just a call to
|
||||||
|
/// <see cref="MvcCoreServiceCollectionExtensions.AddMvcCore(IServiceCollection)"/>. Additional configuration using the
|
||||||
|
/// <see cref="IMvcCoreBuilder"/> will be required.
|
||||||
|
/// </remarks>
|
||||||
public static IMvcCoreBuilder AddMvcCore(this IServiceCollection services)
|
public static IMvcCoreBuilder AddMvcCore(this IServiceCollection services)
|
||||||
{
|
{
|
||||||
if (services == null)
|
if (services == null)
|
||||||
|
|
@ -92,11 +103,22 @@ namespace Microsoft.Extensions.DependencyInjection
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds essential MVC services to the specified <see cref="IServiceCollection" />.
|
/// Adds the minimum essential MVC services to the specified <see cref="IServiceCollection" />. Addtional services
|
||||||
|
/// including MVC's support for authorization, formatters, and validation must be added separately using the
|
||||||
|
/// <see cref="IMvcCoreBuilder"/> returned from this method.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="services">The <see cref="IServiceCollection" /> to add services to.</param>
|
/// <param name="services">The <see cref="IServiceCollection" /> to add services to.</param>
|
||||||
/// <param name="setupAction">An <see cref="Action{MvcOptions}"/> to configure the provided <see cref="MvcOptions"/>.</param>
|
/// <param name="setupAction">An <see cref="Action{MvcOptions}"/> to configure the provided <see cref="MvcOptions"/>.</param>
|
||||||
/// <returns>An <see cref="IMvcCoreBuilder"/> that can be used to further configure the MVC services.</returns>
|
/// <returns>An <see cref="IMvcCoreBuilder"/> that can be used to further configure the MVC services.</returns>
|
||||||
|
/// <remarks>
|
||||||
|
/// The <see cref="MvcCoreServiceCollectionExtensions.AddMvcCore(IServiceCollection)"/> approach for configuring
|
||||||
|
/// MVC is provided for experienced MVC developers who wish to have full control over the set of default services
|
||||||
|
/// registered. <see cref="MvcCoreServiceCollectionExtensions.AddMvcCore(IServiceCollection)"/> will register
|
||||||
|
/// the minimum set of services necessary to route requests and invoke controllers. It is not expected that any
|
||||||
|
/// application will satisfy its requirements with just a call to
|
||||||
|
/// <see cref="MvcCoreServiceCollectionExtensions.AddMvcCore(IServiceCollection)"/>. Additional configuration using the
|
||||||
|
/// <see cref="IMvcCoreBuilder"/> will be required.
|
||||||
|
/// </remarks>
|
||||||
public static IMvcCoreBuilder AddMvcCore(
|
public static IMvcCoreBuilder AddMvcCore(
|
||||||
this IServiceCollection services,
|
this IServiceCollection services,
|
||||||
Action<MvcOptions> setupAction)
|
Action<MvcOptions> setupAction)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue