XmlSerializerOutputFormatter XmlSerializerOutputFormatter XmlSerializerOutputFormatter XmlSerializerOutputFormatter Class

Definition

This class handles serialization of objects to XML using XmlSerializer

public ref class XmlSerializerOutputFormatter : Microsoft::AspNetCore::Mvc::Formatters::TextOutputFormatter
public class XmlSerializerOutputFormatter : Microsoft.AspNetCore.Mvc.Formatters.TextOutputFormatter
type XmlSerializerOutputFormatter = class
    inherit TextOutputFormatter
Public Class XmlSerializerOutputFormatter
Inherits TextOutputFormatter
Inheritance
XmlSerializerOutputFormatterXmlSerializerOutputFormatterXmlSerializerOutputFormatterXmlSerializerOutputFormatter

Constructors

XmlSerializerOutputFormatter() XmlSerializerOutputFormatter() XmlSerializerOutputFormatter() XmlSerializerOutputFormatter()

Initializes a new instance of XmlSerializerOutputFormatter with default XmlWriterSettings.

XmlSerializerOutputFormatter(ILoggerFactory) XmlSerializerOutputFormatter(ILoggerFactory) XmlSerializerOutputFormatter(ILoggerFactory) XmlSerializerOutputFormatter(ILoggerFactory)

Initializes a new instance of XmlSerializerOutputFormatter with default XmlWriterSettings.

XmlSerializerOutputFormatter(XmlWriterSettings) XmlSerializerOutputFormatter(XmlWriterSettings) XmlSerializerOutputFormatter(XmlWriterSettings) XmlSerializerOutputFormatter(XmlWriterSettings)

Initializes a new instance of XmlSerializerOutputFormatter.

XmlSerializerOutputFormatter(XmlWriterSettings, ILoggerFactory) XmlSerializerOutputFormatter(XmlWriterSettings, ILoggerFactory) XmlSerializerOutputFormatter(XmlWriterSettings, ILoggerFactory) XmlSerializerOutputFormatter(XmlWriterSettings, ILoggerFactory)

Initializes a new instance of XmlSerializerOutputFormatter

Properties

SupportedEncodings SupportedEncodings SupportedEncodings SupportedEncodings

Gets the mutable collection of character encodings supported by this TextOutputFormatter. The encodings are used when writing the data.

(Inherited from TextOutputFormatter)
SupportedMediaTypes SupportedMediaTypes SupportedMediaTypes SupportedMediaTypes

Gets the mutable collection of media type elements supported by this OutputFormatter.

(Inherited from OutputFormatter)
WrapperProviderFactories WrapperProviderFactories WrapperProviderFactories WrapperProviderFactories

Gets the list of IWrapperProviderFactory to provide the wrapping type for serialization.

WriterSettings WriterSettings WriterSettings WriterSettings

Gets the settings to be used by the XmlWriter.

Methods

CanWriteResult(OutputFormatterCanWriteContext) CanWriteResult(OutputFormatterCanWriteContext) CanWriteResult(OutputFormatterCanWriteContext) CanWriteResult(OutputFormatterCanWriteContext) Inherited from OutputFormatter
CanWriteType(Type) CanWriteType(Type) CanWriteType(Type) CanWriteType(Type)
CreateSerializer(Type) CreateSerializer(Type) CreateSerializer(Type) CreateSerializer(Type)

Create a new instance of XmlSerializer for the given object type.

CreateXmlWriter(OutputFormatterWriteContext, TextWriter, XmlWriterSettings) CreateXmlWriter(OutputFormatterWriteContext, TextWriter, XmlWriterSettings) CreateXmlWriter(OutputFormatterWriteContext, TextWriter, XmlWriterSettings) CreateXmlWriter(OutputFormatterWriteContext, TextWriter, XmlWriterSettings)

Creates a new instance of XmlWriter using the given TextWriter and XmlWriterSettings.

CreateXmlWriter(TextWriter, XmlWriterSettings) CreateXmlWriter(TextWriter, XmlWriterSettings) CreateXmlWriter(TextWriter, XmlWriterSettings) CreateXmlWriter(TextWriter, XmlWriterSettings)

Creates a new instance of XmlWriter using the given TextWriter and XmlWriterSettings.

GetCachedSerializer(Type) GetCachedSerializer(Type) GetCachedSerializer(Type) GetCachedSerializer(Type)

Gets the cached serializer or creates and caches the serializer for the given type.

GetSerializableType(Type) GetSerializableType(Type) GetSerializableType(Type) GetSerializableType(Type)

Gets the type to be serialized.

GetSupportedContentTypes(String, Type) GetSupportedContentTypes(String, Type) GetSupportedContentTypes(String, Type) GetSupportedContentTypes(String, Type) Inherited from OutputFormatter
SelectCharacterEncoding(OutputFormatterWriteContext) SelectCharacterEncoding(OutputFormatterWriteContext) SelectCharacterEncoding(OutputFormatterWriteContext) SelectCharacterEncoding(OutputFormatterWriteContext)

Determines the best Encoding amongst the supported encodings for reading or writing an HTTP entity body based on the provided content type.

(Inherited from TextOutputFormatter)
Serialize(XmlSerializer, XmlWriter, Object) Serialize(XmlSerializer, XmlWriter, Object) Serialize(XmlSerializer, XmlWriter, Object) Serialize(XmlSerializer, XmlWriter, Object)

Serializes value using the passed in xmlSerializer and xmlWriter.

WriteAsync(OutputFormatterWriteContext) WriteAsync(OutputFormatterWriteContext) WriteAsync(OutputFormatterWriteContext) WriteAsync(OutputFormatterWriteContext) Inherited from TextOutputFormatter
WriteResponseBodyAsync(OutputFormatterWriteContext) WriteResponseBodyAsync(OutputFormatterWriteContext) WriteResponseBodyAsync(OutputFormatterWriteContext) WriteResponseBodyAsync(OutputFormatterWriteContext) Inherited from TextOutputFormatter
WriteResponseBodyAsync(OutputFormatterWriteContext, Encoding) WriteResponseBodyAsync(OutputFormatterWriteContext, Encoding) WriteResponseBodyAsync(OutputFormatterWriteContext, Encoding) WriteResponseBodyAsync(OutputFormatterWriteContext, Encoding)
WriteResponseHeaders(OutputFormatterWriteContext) WriteResponseHeaders(OutputFormatterWriteContext) WriteResponseHeaders(OutputFormatterWriteContext) WriteResponseHeaders(OutputFormatterWriteContext)

Sets the headers on HttpResponse object.

(Inherited from OutputFormatter)

Applies to