Table of Contents

Class XmlResponseNegotiator

Namespace
Codebelt.Extensions.Carter.AspNetCore.Xml
Assembly
Codebelt.Extensions.Carter.AspNetCore.Xml.dll

Provides an XML response negotiator for Carter, capable of serializing response models to XML format.

public class XmlResponseNegotiator : ConfigurableResponseNegotiator<XmlFormatterOptions>, IConfigurable<XmlFormatterOptions>, IResponseNegotiator
Inheritance
XmlResponseNegotiator
Implements
Inherited Members

Constructors

XmlResponseNegotiator(IOptions<XmlFormatterOptions>)

Initializes a new instance of the XmlResponseNegotiator class.

public XmlResponseNegotiator(IOptions<XmlFormatterOptions> options)

Parameters

options IOptions<XmlFormatterOptions>

The XmlFormatterOptions used to configure XML serialization and supported media types.

Methods

GetDefaultEncoding()

Returns the character encoding specified by the XmlFormatterOptions writer settings.

protected override Encoding GetDefaultEncoding()

Returns

Encoding

The default Encoding for this negotiator.

GetFormatter()

Returns a new XmlFormatter configured with the current XmlFormatterOptions.

public override StreamFormatter<XmlFormatterOptions> GetFormatter()

Returns

StreamFormatter<XmlFormatterOptions>

A XmlFormatter instance configured with the current XmlFormatterOptions.

See Also