MvcCoreMvcCoreBuilderExtensions.AddFormatterMappings 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
AddFormatterMappings(IMvcCoreBuilder) |
添加服务以支持 FormatterMappings。 |
AddFormatterMappings(IMvcCoreBuilder, Action<FormatterMappings>) |
FormatterMappings为指定的 |
AddFormatterMappings(IMvcCoreBuilder)
添加服务以支持 FormatterMappings。
public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddFormatterMappings (this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder);
static member AddFormatterMappings : Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder
<Extension()>
Public Function AddFormatterMappings (builder As IMvcCoreBuilder) As IMvcCoreBuilder
参数
- builder
- IMvcCoreBuilder
返回
适用于
AddFormatterMappings(IMvcCoreBuilder, Action<FormatterMappings>)
FormatterMappings为指定的 setupAction
进行配置。
public static Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder AddFormatterMappings (this Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder builder, Action<Microsoft.AspNetCore.Mvc.Formatters.FormatterMappings> setupAction);
static member AddFormatterMappings : Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder * Action<Microsoft.AspNetCore.Mvc.Formatters.FormatterMappings> -> Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder
<Extension()>
Public Function AddFormatterMappings (builder As IMvcCoreBuilder, setupAction As Action(Of FormatterMappings)) As IMvcCoreBuilder
参数
- builder
- IMvcCoreBuilder
- setupAction
- Action<FormatterMappings>
用于配置 FormatterMappings 的 Action。