XmlSerializerInputFormatter Class

Definition

This class handles deserialization of input XML data to strongly-typed objects using XmlSerializer

public ref class XmlSerializerInputFormatter : Microsoft::AspNetCore::Mvc::Formatters::TextInputFormatter
public ref class XmlSerializerInputFormatter : Microsoft::AspNetCore::Mvc::Formatters::TextInputFormatter, Microsoft::AspNetCore::Mvc::Formatters::IInputFormatterExceptionPolicy
public class XmlSerializerInputFormatter : Microsoft.AspNetCore.Mvc.Formatters.TextInputFormatter
public class XmlSerializerInputFormatter : Microsoft.AspNetCore.Mvc.Formatters.TextInputFormatter, Microsoft.AspNetCore.Mvc.Formatters.IInputFormatterExceptionPolicy
type XmlSerializerInputFormatter = class
    inherit TextInputFormatter
type XmlSerializerInputFormatter = class
    inherit TextInputFormatter
    interface IInputFormatterExceptionPolicy
Public Class XmlSerializerInputFormatter
Inherits TextInputFormatter
Public Class XmlSerializerInputFormatter
Inherits TextInputFormatter
Implements IInputFormatterExceptionPolicy
Inheritance
XmlSerializerInputFormatter
Implements

Constructors

XmlSerializerInputFormatter()
Obsolete.

Initializes a new instance of XmlSerializerInputFormatter.

XmlSerializerInputFormatter(Boolean)
Obsolete.

Initializes a new instance of XmlSerializerInputFormatter.

XmlSerializerInputFormatter(MvcOptions)

Initializes a new instance of XmlSerializerInputFormatter.

Properties

ExceptionPolicy

Gets the flag to indicate if the body model binder should handle all exceptions. If an exception is handled, the body model binder converts the exception into model state errors, else the exception is allowed to propagate.

MaxDepth

Indicates the acceptable input XML depth.

SupportedEncodings

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

(Inherited from TextInputFormatter)
SupportedMediaTypes

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

(Inherited from InputFormatter)
WrapperProviderFactories

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

XmlDictionaryReaderQuotas

The quotas include - DefaultMaxDepth, DefaultMaxStringContentLength, DefaultMaxArrayLength, DefaultMaxBytesPerRead, DefaultMaxNameTableCharCount

Methods

CanRead(InputFormatterContext)

Determines whether this IInputFormatter can deserialize an object of the context's ModelType.

(Inherited from InputFormatter)
CanReadType(Type)

Determines whether this InputFormatter can deserialize an object of the given type.

CreateSerializer(Type)

Called during deserialization to get the XmlSerializer.

CreateXmlReader(Stream, Encoding)

Called during deserialization to get the XmlReader.

CreateXmlReader(Stream, Encoding, Type)

Called during deserialization to get the XmlReader.

GetCachedSerializer(Type)

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

GetDefaultValueForType(Type)

Gets the default value for a given type. Used to return a default value when the body contains no content.

(Inherited from InputFormatter)
GetSerializableType(Type)

Gets the type to which the XML will be deserialized.

GetSupportedContentTypes(String, Type)

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

(Inherited from InputFormatter)
ReadAsync(InputFormatterContext)

Reads an object from the request body.

(Inherited from InputFormatter)
ReadRequestBodyAsync(InputFormatterContext)

Reads an object from the request body.

(Inherited from TextInputFormatter)
ReadRequestBodyAsync(InputFormatterContext, Encoding)

Reads an object from the request body.

SelectCharacterEncoding(InputFormatterContext)

Returns an Encoding based on context's character set.

(Inherited from TextInputFormatter)

Applies to