Class MvcCoreBuilderExtensions
- Assembly
- Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml.dll
Extension methods for the Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder interface.
public static class MvcCoreBuilderExtensions
- Inheritance
-
MvcCoreBuilderExtensions
Methods
AddXmlFormatters(IMvcCoreBuilder, Action<XmlFormatterOptions>)
Adds the XML serializer formatters to MVC.
public static IMvcCoreBuilder AddXmlFormatters(this IMvcCoreBuilder builder, Action<XmlFormatterOptions> setup = null)
Parameters
builder
IMvcCoreBuilderThe Microsoft.Extensions.DependencyInjection.IMvcCoreBuilder.
setup
Action<XmlFormatterOptions>The XmlFormatterOptions which may be configured.
Returns
- IMvcCoreBuilder
A reference to
builder
after the operation has completed.
Exceptions
- ArgumentNullException
builder
cannot be null -or-setup
cannot be null.
AddXmlFormattersOptions(IMvcCoreBuilder, Action<XmlFormatterOptions>)
Adds configuration of XmlFormatterOptions for the application.
public static IMvcCoreBuilder AddXmlFormattersOptions(this IMvcCoreBuilder builder, Action<XmlFormatterOptions> setup = null)
Parameters
builder
IMvcCoreBuilderThe Microsoft.Extensions.DependencyInjection.IMvcBuilder.
setup
Action<XmlFormatterOptions>The XmlFormatterOptions which need to be configured.
Returns
- IMvcCoreBuilder
A reference to
builder
after the operation has completed.
Exceptions
- ArgumentNullException
builder
cannot be null.- ArgumentException
setup
failed to configure an instance of XmlFormatterOptions in a valid state.