Class MvcBuilderExtensions
- Assembly
- Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml.dll
Extension methods for the Microsoft.Extensions.DependencyInjection.IMvcBuilder interface.
public static class MvcBuilderExtensions
- Inheritance
-
MvcBuilderExtensions
Methods
AddXmlFormatters(IMvcBuilder, Action<XmlFormatterOptions>)
Adds the XML serializer formatters to MVC.
public static IMvcBuilder AddXmlFormatters(this IMvcBuilder builder, Action<XmlFormatterOptions> setup = null)
Parameters
builder
IMvcBuilderThe Microsoft.Extensions.DependencyInjection.IMvcBuilder to extend.
setup
Action<XmlFormatterOptions>The XmlFormatterOptions which may be configured.
Returns
- IMvcBuilder
A reference to
builder
after the operation has completed.
Exceptions
- ArgumentNullException
builder
cannot be null -or-setup
cannot be null.
AddXmlFormattersOptions(IMvcBuilder, Action<XmlFormatterOptions>)
Adds configuration of XmlFormatterOptions for the application.
public static IMvcBuilder AddXmlFormattersOptions(this IMvcBuilder builder, Action<XmlFormatterOptions> setup = null)
Parameters
builder
IMvcBuilderThe Microsoft.Extensions.DependencyInjection.IMvcBuilder to extend.
setup
Action<XmlFormatterOptions>The XmlFormatterOptions which need to be configured.
Returns
- IMvcBuilder
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.