Class IntermediateSerializer
- 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
inputXmlReaderThe XmlReader to read from.
referenceRelocationPathstringThe path to relocate any relative references to.
Returns
- T
The deserialized object of type T.
Type Parameters
TThe 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
typeTypeThe 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
outputXmlWriterThe XML writer to write the serialized value to.
valueTThe value to serialize.
referenceRelocationPathstringThe path to relocate any relative references to.
Type Parameters
TThe type of the value to serialize.