MvcCoreMvcCoreBuilderExtensions.AddFormatterMappings 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
AddFormatterMappings(IMvcCoreBuilder) |
新增服務以支援 FormatterMappings 。 |
AddFormatterMappings(IMvcCoreBuilder, Action<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>)
為指定的 setupAction
設定 FormatterMappings 。
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。