XmlMediaTypeFormatter Methods
Include Protected Members
Include Inherited Members
The XmlMediaTypeFormatter type exposes the following members.
Methods
Name | Description | |
---|---|---|
CanReadType | Queries whether the XmlMediaTypeFormatter can deserializean object of the specified type. (Overrides MediaTypeFormatter.CanReadType(Type).) | |
CanWriteType | Queries whether the XmlMediaTypeFormatter can serializean object of the specified type. (Overrides MediaTypeFormatter.CanWriteType(Type).) | |
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
GetHashCode | (Inherited from Object.) | |
GetPerRequestFormatterInstance | Returns a specialized instance of the MediaTypeFormatter that can format a response for the given parameters. (Inherited from MediaTypeFormatter.) | |
GetType | (Inherited from Object.) | |
MemberwiseClone | (Inherited from Object.) | |
ReadFromStreamAsync | Called during deserialization to read an object of the specified type from the specified readStream. (Overrides MediaTypeFormatter.ReadFromStreamAsync(Type, Stream, HttpContent, IFormatterLogger).) | |
RemoveSerializer | Unregisters the serializer currently associated with the given type. | |
SelectCharacterEncoding | Determines the best character encoding for reading or writing an HTTP entity body, given a set of content headers. (Inherited from MediaTypeFormatter.) | |
SetDefaultContentHeaders | Sets the default headers for content that will be formatted using this formatter. This method is called from the ObjectContent constructor. This implementation sets the Content-Type header to the value of mediaType if it is not null. If it is null it sets the Content-Type to the default media type of this formatter. If the Content-Type does not specify a charset it will set it using this formatters configured Encoding. (Inherited from MediaTypeFormatter.) | |
SetSerializer(Type, XmlObjectSerializer) | Registers an XmlObjectSerializer to read or write objects of a specified type. | |
SetSerializer(Type, XmlSerializer) | Registers an XmlSerializer to read or write objects of a specified type. | |
SetSerializer<T>(XmlObjectSerializer) | Registers an XmlObjectSerializer to read or write objects of a specified type. | |
SetSerializer<T>(XmlSerializer) | Registers an XmlSerializer to read or write objects of a specified type. | |
ToString | (Inherited from Object.) | |
WriteToStreamAsync | Called during serialization to write an object of the specified type to the specified writeStream. (Overrides MediaTypeFormatter.WriteToStreamAsync(Type, Object, Stream, HttpContent, TransportContext).) |
Top
Extension Methods
Name | Description | |
---|---|---|
AddQueryStringMapping(String, String, MediaTypeHeaderValue) | Overloaded. Updates the given set of formatter of MediaTypeMapping elements so that it associates the mediaType with Uris containing a specific query parameter and value. (Defined by MediaTypeFormatterExtensions.) | |
AddQueryStringMapping(String, String, String) | Overloaded. Updates the given set of formatter of MediaTypeMapping elements so that it associates the mediaType with Uris containing a specific query parameter and value. (Defined by MediaTypeFormatterExtensions.) | |
AddRequestHeaderMapping(String, String, StringComparison, Boolean, MediaTypeHeaderValue) | Overloaded. Updates the given set of formatter of MediaTypeMapping elements so that it associates the mediaType with a specific HTTP request header field with a specific value. (Defined by MediaTypeFormatterExtensions.) | |
AddRequestHeaderMapping(String, String, StringComparison, Boolean, String) | Overloaded. Updates the given set of formatter of MediaTypeMapping elements so that it associates the mediaType with a specific HTTP request header field with a specific value. (Defined by MediaTypeFormatterExtensions.) | |
AddUriPathExtensionMapping(String, MediaTypeHeaderValue) | Overloaded. Updates the given formatter's set of MediaTypeMapping elements so that it associates the mediaType with Uris ending with the given uriPathExtension. (Defined by MediaTypeFormatterExtensions.) | |
AddUriPathExtensionMapping(String, String) | Overloaded. Updates the given formatter's set of MediaTypeMapping elements so that it associates the mediaType with Uris ending with the given uriPathExtension. (Defined by MediaTypeFormatterExtensions.) |
Top