Table of Contents

Class MvcCoreBuilderExtensions

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

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

public static class MvcCoreBuilderExtensions
Inheritance
Object
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 IMvcCoreBuilder

The 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

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

The 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

System.ArgumentNullException

builder cannot be null.

System.ArgumentException

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