Add `AddDataAnnotationsLocalization` parameterless overload.

- The `IMvcBuilder` extension methods already had this overload, just adding it to `IMvcCoreBuilder`.

#3517
This commit is contained in:
N. Taylor Mullen 2015-11-11 15:12:17 -08:00
parent 94a4c8e3f4
commit 73f557002f
1 changed files with 15 additions and 0 deletions

View File

@ -31,6 +31,21 @@ namespace Microsoft.Extensions.DependencyInjection
return builder;
}
/// <summary>
/// Adds MVC data annotations localization to the application.
/// </summary>
/// <param name="builder">The <see cref="IMvcCoreBuilder"/>.</param>
/// <returns>The <see cref="IMvcCoreBuilder"/>.</returns>
public static IMvcCoreBuilder AddDataAnnotationsLocalization(this IMvcCoreBuilder builder)
{
if (builder == null)
{
throw new ArgumentNullException(nameof(builder));
}
return AddDataAnnotationsLocalization(builder, setupAction: null);
}
/// <summary>
/// Registers an action to configure <see cref="MvcDataAnnotationsLocalizationOptions"/> for MVC data
/// annotations localization.