Table of Contents

AddXmlFormatterOptions Method

Definition

AddXmlFormatterOptions(IServiceCollection, Action<XmlFormatterOptions>)

Adds configuration of XmlFormatterOptions for the application.

public static IServiceCollection AddXmlFormatterOptions(this IServiceCollection services, Action<XmlFormatterOptions> setup = null)

Parameters

services IServiceCollection

The IServiceCollection to extend.

setup Action<XmlFormatterOptions>

The XmlFormatterOptions which may be configured.

Returns

IServiceCollection

A reference to services so that additional configuration calls can be chained.

Exceptions

ArgumentNullException

services cannot be null.

ArgumentException

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