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
input
XmlReaderThe XmlReader to read from.
referenceRelocationPath
stringThe 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
TypeThe 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
XmlWriterThe XML writer to write the serialized value to.
value
TThe value to serialize.
referenceRelocationPath
stringThe path to relocate any relative references to.
Type Parameters
T
The type of the value to serialize.