Make AddMvcCore docs scarier

Fixes #6632
This commit is contained in:
Ryan Nowak 2017-08-30 12:52:10 -07:00
parent 81af619cf7
commit 257d202a14
1 changed files with 24 additions and 2 deletions

View File

@ -30,10 +30,21 @@ namespace Microsoft.Extensions.DependencyInjection
public static class MvcCoreServiceCollectionExtensions
{
/// <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>
/// <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>
/// <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)
{
if (services == null)
@ -92,11 +103,22 @@ namespace Microsoft.Extensions.DependencyInjection
}
/// <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>
/// <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>
/// <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,
Action<MvcOptions> setupAction)