Class IntermediateReader
- Assembly
- MonoGame.Framework.Content.Pipeline.dll
IntermetiateReader is used to read content from the intermediate format.
public sealed class IntermediateReader
- Inheritance
-
IntermediateReader
- Inherited Members
Properties
Serializer
Gets the serializer.
public IntermediateSerializer Serializer { get; }
Property Value
Xml
Gets the instances XML reader.
public XmlReader Xml { get; }
Property Value
Methods
MoveToElement(string)
Moves the XML reader to the specified element.
public bool MoveToElement(string elementName)
Parameters
elementName
stringThe name of the element to move to.
Returns
- bool
true
if the element is found,false
otherwise.
ReadExternalReference<T>(ExternalReference<T>)
Reads an external reference of a given type.
public void ReadExternalReference<T>(ExternalReference<T> existingInstance)
Parameters
existingInstance
ExternalReference<T>The existing instance of the ExternalReference.
Type Parameters
T
The type of the external reference.
Exceptions
- InvalidContentException
Thrown if the external reference type is invalid.
ReadObject<T>(ContentSerializerAttribute)
Reads an object from the XML.
public T ReadObject<T>(ContentSerializerAttribute format)
Parameters
format
ContentSerializerAttributeThe format attribute to use.
Returns
- T
The deserialized object of type T.
Type Parameters
T
The type of the object.
ReadObject<T>(ContentSerializerAttribute, ContentTypeSerializer)
Reads an object from the XML.
public T ReadObject<T>(ContentSerializerAttribute format, ContentTypeSerializer typeSerializer)
Parameters
format
ContentSerializerAttributeThe format attribute to use.
typeSerializer
ContentTypeSerializerThe type serializer to use.
Returns
- T
The deserialized object of type T.
Type Parameters
T
The type of the object.
ReadObject<T>(ContentSerializerAttribute, ContentTypeSerializer, T)
Reads an object from the XML.
public T ReadObject<T>(ContentSerializerAttribute format, ContentTypeSerializer typeSerializer, T existingInstance)
Parameters
format
ContentSerializerAttributeThe format attribute of the object.
typeSerializer
ContentTypeSerializerThe type serializer for the object.
existingInstance
TAn existing instance of the object.
Returns
- T
The deserialized object of type T.
Type Parameters
T
The type of the object.
Exceptions
- InvalidContentException
Thrown when the element can not be found, is null or cannot be assigned.
ReadObject<T>(ContentSerializerAttribute, T)
Reads an object from the XML.
public T ReadObject<T>(ContentSerializerAttribute format, T existingInstance)
Parameters
format
ContentSerializerAttributeThe format attribute of the object.
existingInstance
TAn existing instance of the object.
Returns
- T
The deserialized object of type T.
Type Parameters
T
The type of the object.
ReadRawObject<T>(ContentSerializerAttribute)
Reads a raw object from the XML using the specified format and type serializer.
public T ReadRawObject<T>(ContentSerializerAttribute format)
Parameters
format
ContentSerializerAttributeThe format attribute of the object.
Returns
- T
The deserialized object of type T.
Type Parameters
T
The type of the object.
Exceptions
- InvalidContentException
Thrown when the element can not be found or is null.
ReadRawObject<T>(ContentSerializerAttribute, ContentTypeSerializer)
Reads an object from the XML.
public T ReadRawObject<T>(ContentSerializerAttribute format, ContentTypeSerializer typeSerializer)
Parameters
format
ContentSerializerAttributeThe format attribute of the object.
typeSerializer
ContentTypeSerializerThe type serializer for the object.
Returns
- T
The deserialized object of type T.
Type Parameters
T
The type of the object.
ReadRawObject<T>(ContentSerializerAttribute, ContentTypeSerializer, T)
Reads a raw object from the XML using the specified format and type serializer.
public T ReadRawObject<T>(ContentSerializerAttribute format, ContentTypeSerializer typeSerializer, T existingInstance)
Parameters
format
ContentSerializerAttributeThe format attribute of the object.
typeSerializer
ContentTypeSerializerThe type serializer for the object.
existingInstance
TAn existing instance of the object.
Returns
- T
The deserialized object of type T.
Type Parameters
T
The type of the object.
Exceptions
- InvalidContentException
Thrown when the element can not be found or is null.
ReadRawObject<T>(ContentSerializerAttribute, T)
Reads a raw object from the XML using the specified format and type serializer.
public T ReadRawObject<T>(ContentSerializerAttribute format, T existingInstance)
Parameters
format
ContentSerializerAttributeThe format attribute of the object.
existingInstance
TAn existing instance of the object.
Returns
- T
The deserialized object of type T.
Type Parameters
T
The type of the object.
Exceptions
- InvalidContentException
Thrown when the element can not be found or is null.
ReadSharedResource<T>(ContentSerializerAttribute, Action<T>)
Reads a shared resource from the XML using the specified format and fixup action.
public void ReadSharedResource<T>(ContentSerializerAttribute format, Action<T> fixup)
Parameters
format
ContentSerializerAttributeThe format attribute of the resource.
fixup
Action<T>The fixup action to apply to the resource.
Type Parameters
T
The type of the resource.
Exceptions
- InvalidContentException
Thrown if the element specified by the format attribute is not found.
ReadTypeName()
Reads the next type in the
public Type ReadTypeName()