MvcDataAnnotationsMvcCoreBuilderExtensions.AddDataAnnotationsLocalization 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
AddDataAnnotationsLocalization(IMvcCoreBuilder) |
将 MVC 数据注释本地化添加到应用程序。 |
AddDataAnnotationsLocalization(IMvcCoreBuilder, Action<MvcDataAnnotationsLocalizationOptions>) |
注册要为 MVC 数据注释本地化配置的 MvcDataAnnotationsLocalizationOptions 操作。 |
AddDataAnnotationsLocalization(IMvcCoreBuilder)
将 MVC 数据注释本地化添加到应用程序。
public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddDataAnnotationsLocalization (this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder);
static member AddDataAnnotationsLocalization : Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder
<Extension()>
Public Function AddDataAnnotationsLocalization (builder As IMvcCoreBuilder) As IMvcCoreBuilder
参数
- builder
- IMvcCoreBuilder
返回
适用于
AddDataAnnotationsLocalization(IMvcCoreBuilder, Action<MvcDataAnnotationsLocalizationOptions>)
注册要为 MVC 数据注释本地化配置的 MvcDataAnnotationsLocalizationOptions 操作。
public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddDataAnnotationsLocalization (this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, Action<Microsoft.AspNetCore.Mvc.DataAnnotations.MvcDataAnnotationsLocalizationOptions> setupAction);
public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddDataAnnotationsLocalization (this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, Action<Microsoft.AspNetCore.Mvc.DataAnnotations.MvcDataAnnotationsLocalizationOptions>? setupAction);
static member AddDataAnnotationsLocalization : Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder * Action<Microsoft.AspNetCore.Mvc.DataAnnotations.MvcDataAnnotationsLocalizationOptions> -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder
<Extension()>
Public Function AddDataAnnotationsLocalization (builder As IMvcCoreBuilder, setupAction As Action(Of MvcDataAnnotationsLocalizationOptions)) As IMvcCoreBuilder
参数
- builder
- IMvcCoreBuilder
- setupAction
- Action<MvcDataAnnotationsLocalizationOptions>