Share via


XmlDataContractSerializerOutputFormatter Class

Definition

This class handles serialization of objects to XML using DataContractSerializer

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

Constructors

XmlDataContractSerializerOutputFormatter()

Initializes a new instance of XmlDataContractSerializerOutputFormatter with default XmlWriterSettings.

XmlDataContractSerializerOutputFormatter(ILoggerFactory)

Initializes a new instance of XmlDataContractSerializerOutputFormatter with default XmlWriterSettings.

XmlDataContractSerializerOutputFormatter(XmlWriterSettings, ILoggerFactory)

Initializes a new instance of XmlDataContractSerializerOutputFormatter.

XmlDataContractSerializerOutputFormatter(XmlWriterSettings)

Initializes a new instance of XmlDataContractSerializerOutputFormatter.

Properties

SerializerSettings

Gets or sets the DataContractSerializerSettings used to configure the DataContractSerializer.

SupportedEncodings

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

(Inherited from TextOutputFormatter)
SupportedMediaTypes

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

(Inherited from OutputFormatter)
WrapperProviderFactories

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

WriterSettings

Gets the settings to be used by the XmlWriter.

Methods

CanWriteResult(OutputFormatterCanWriteContext)

Determines whether this IOutputFormatter can serialize an object of the specified type.

(Inherited from OutputFormatter)
CanWriteType(Type)

Returns a value indicating whether or not the given type can be written by this serializer.

CreateSerializer(Type)

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

CreateXmlWriter(OutputFormatterWriteContext, TextWriter, XmlWriterSettings)

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

CreateXmlWriter(TextWriter, XmlWriterSettings)

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

GetCachedSerializer(Type)

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

GetSerializableType(Type)

Gets the type to be serialized.

GetSupportedContentTypes(String, Type)

Gets a filtered list of content types which are supported by the IOutputFormatter for the objectType and contentType.

(Inherited from OutputFormatter)
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)
WriteAsync(OutputFormatterWriteContext)

Writes the object represented by context's Object property.

(Inherited from TextOutputFormatter)
WriteResponseBodyAsync(OutputFormatterWriteContext, Encoding)

Writes the response body.

WriteResponseBodyAsync(OutputFormatterWriteContext)

Writes the response body.

(Inherited from TextOutputFormatter)
WriteResponseHeaders(OutputFormatterWriteContext)

Sets the headers on HttpResponse object.

(Inherited from OutputFormatter)

Applies to