Export (0) Print
Expand All

XmlMediaTypeFormatter.SetSerializer Method (Type, XmlObjectSerializer)

Registers an XmlObjectSerializer to read or write objects of a specified type.

Namespace:  System.Net.Http.Formatting
Assembly:  System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)

public void SetSerializer(
	Type type,
	XmlObjectSerializer serializer
)

Parameters

type
Type: System.Type
The type of object that will be serialized or deserialized withserializer.
serializer
Type: System.Runtime.Serialization.XmlObjectSerializer
The XmlObjectSerializer instance.

If no serializer is registered for a particular type, the XML formatter uses its default serializer. The default serializer is DataContractSerializer unless UseXmlSerializer is true.

Show:
© 2014 Microsoft