Table of Contents

Class IntermediateSerializer

Namespace
Microsoft.Xna.Framework.Content.Pipeline.Serialization.Intermediate
Assembly
MonoGame.Framework.Content.Pipeline.dll

Provides methods for reading and writing XNA intermediate XML format.

public class IntermediateSerializer
Inheritance
IntermediateSerializer
Inherited Members

Methods

Deserialize<T>(XmlReader, string)

Deserializes an object using the IntermediateSerializer and IntermediateReader.

public static T Deserialize<T>(XmlReader input, string referenceRelocationPath)

Parameters

input XmlReader

The XmlReader to read from.

referenceRelocationPath string

The path to relocate any relative references to.

Returns

T

The deserialized object of type T.

Type Parameters

T

The type of object to deserialize.

Exceptions

InvalidContentException

Thrown if no content is found.

XmlException

Thrown if an error occurs parsing the XML.

GetTypeSerializer(Type)

Retrieves the serializer for the specified type.

public ContentTypeSerializer GetTypeSerializer(Type type)

Parameters

type Type

The type for which to retrieve the serializer.

Returns

ContentTypeSerializer

The serializer for the specified type.

Exceptions

RankException

Thrown if the type is not a single dimensional array.

NotImplementedException

Thrown if there is no implementation for the type.

Serialize<T>(XmlWriter, T, string)

Serializes the given value of type T to an XML writer.

public static void Serialize<T>(XmlWriter output, T value, string referenceRelocationPath)

Parameters

output XmlWriter

The XML writer to write the serialized value to.

value T

The value to serialize.

referenceRelocationPath string

The path to relocate any relative references to.

Type Parameters

T

The type of the value to serialize.