Class ContentTypeSerializer<T>
- Assembly
- MonoGame.Framework.Content.Pipeline.dll
Provides a generic implementation of ContentTypeSerializer methods and properties for serializing and deserializing a specific managed type.
public abstract class ContentTypeSerializer<T> : ContentTypeSerializer
Type Parameters
T
- Inheritance
-
ContentTypeSerializer<T>
- Inherited Members
Constructors
ContentTypeSerializer()
Initializes a new instance of the ContentTypeSerializer class.
protected ContentTypeSerializer()
ContentTypeSerializer(string)
Initializes a new instance of the ContentTypeSerializer class using the specified XML shortcut name.
protected ContentTypeSerializer(string xmlTypeName)
Parameters
xmlTypeName
stringXml shortcut name.
Methods
Deserialize(IntermediateReader, ContentSerializerAttribute, object)
protected override object Deserialize(IntermediateReader input, ContentSerializerAttribute format, object existingInstance)
Parameters
input
IntermediateReaderformat
ContentSerializerAttributeexistingInstance
object
Returns
Deserialize(IntermediateReader, ContentSerializerAttribute, T)
protected abstract T Deserialize(IntermediateReader input, ContentSerializerAttribute format, T existingInstance)
Parameters
input
IntermediateReaderformat
ContentSerializerAttributeexistingInstance
T
Returns
- T
ObjectIsEmpty(object)
Queries whether an object contains data to be serialized.
public override bool ObjectIsEmpty(object value)
Parameters
value
objectThe object to test.
Returns
- bool
true
if the object is empty; otherwise,false
.
ObjectIsEmpty(T)
Queries whether an object contains data to be serialized.
public virtual bool ObjectIsEmpty(T value)
Parameters
value
TThe object to test.
Returns
- bool
true
if the object is empty; otherwise,false
.
ScanChildren(IntermediateSerializer, ChildCallback, object)
protected override void ScanChildren(IntermediateSerializer serializer, ContentTypeSerializer.ChildCallback callback, object value)
Parameters
serializer
IntermediateSerializercallback
ContentTypeSerializer.ChildCallbackvalue
object
ScanChildren(IntermediateSerializer, ChildCallback, T)
protected virtual void ScanChildren(IntermediateSerializer serializer, ContentTypeSerializer.ChildCallback callback, T value)
Parameters
serializer
IntermediateSerializercallback
ContentTypeSerializer.ChildCallbackvalue
T
Serialize(IntermediateWriter, object, ContentSerializerAttribute)
protected override void Serialize(IntermediateWriter output, object value, ContentSerializerAttribute format)
Parameters
output
IntermediateWritervalue
objectformat
ContentSerializerAttribute
Serialize(IntermediateWriter, T, ContentSerializerAttribute)
protected abstract void Serialize(IntermediateWriter output, T value, ContentSerializerAttribute format)
Parameters
output
IntermediateWritervalue
Tformat
ContentSerializerAttribute