Add `AddDataAnnotationsLocalization` parameterless overload.
- The `IMvcBuilder` extension methods already had this overload, just adding it to `IMvcCoreBuilder`. #3517
This commit is contained in:
parent
94a4c8e3f4
commit
73f557002f
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue