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
xmlTypeNamestringXml shortcut name.
Methods
Deserialize(IntermediateReader, ContentSerializerAttribute, object)
protected override object Deserialize(IntermediateReader input, ContentSerializerAttribute format, object existingInstance)
Parameters
inputIntermediateReaderformatContentSerializerAttributeexistingInstanceobject
Returns
Deserialize(IntermediateReader, ContentSerializerAttribute, T)
protected abstract T Deserialize(IntermediateReader input, ContentSerializerAttribute format, T existingInstance)
Parameters
inputIntermediateReaderformatContentSerializerAttributeexistingInstanceT
Returns
- T
ObjectIsEmpty(object)
Queries whether an object contains data to be serialized.
public override bool ObjectIsEmpty(object value)
Parameters
valueobjectThe object to test.
Returns
- bool
trueif the object is empty; otherwise,false.
ObjectIsEmpty(T)
Queries whether an object contains data to be serialized.
public virtual bool ObjectIsEmpty(T value)
Parameters
valueTThe object to test.
Returns
- bool
trueif the object is empty; otherwise,false.
ScanChildren(IntermediateSerializer, ChildCallback, object)
protected override void ScanChildren(IntermediateSerializer serializer, ContentTypeSerializer.ChildCallback callback, object value)
Parameters
serializerIntermediateSerializercallbackContentTypeSerializer.ChildCallbackvalueobject
ScanChildren(IntermediateSerializer, ChildCallback, T)
protected virtual void ScanChildren(IntermediateSerializer serializer, ContentTypeSerializer.ChildCallback callback, T value)
Parameters
serializerIntermediateSerializercallbackContentTypeSerializer.ChildCallbackvalueT
Serialize(IntermediateWriter, object, ContentSerializerAttribute)
protected override void Serialize(IntermediateWriter output, object value, ContentSerializerAttribute format)
Parameters
outputIntermediateWritervalueobjectformatContentSerializerAttribute
Serialize(IntermediateWriter, T, ContentSerializerAttribute)
protected abstract void Serialize(IntermediateWriter output, T value, ContentSerializerAttribute format)
Parameters
outputIntermediateWritervalueTformatContentSerializerAttribute