Table of Contents

Class MvcBuilderExtensions

Namespace
Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml
Assembly
Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml.dll

Extension methods for the Microsoft.Extensions.DependencyInjection.IMvcBuilder interface.

public static class MvcBuilderExtensions
Inheritance
Object
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 IMvcBuilder

The 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

System.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 IMvcBuilder

The 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

System.ArgumentNullException

builder cannot be null.

System.ArgumentException

setup failed to configure an instance of XmlFormatterOptions in a valid state.