Table of Contents

Class ContentTypeSerializer<T>

Namespace
Microsoft.Xna.Framework.Content.Pipeline.Serialization.Intermediate
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 string

Xml shortcut name.

Methods

Deserialize(IntermediateReader, ContentSerializerAttribute, object)

protected override object Deserialize(IntermediateReader input, ContentSerializerAttribute format, object existingInstance)

Parameters

input IntermediateReader
format ContentSerializerAttribute
existingInstance object

Returns

object

Deserialize(IntermediateReader, ContentSerializerAttribute, T)

protected abstract T Deserialize(IntermediateReader input, ContentSerializerAttribute format, T existingInstance)

Parameters

input IntermediateReader
format ContentSerializerAttribute
existingInstance T

Returns

T

ObjectIsEmpty(object)

Queries whether an object contains data to be serialized.

public override bool ObjectIsEmpty(object value)

Parameters

value object

The 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 T

The 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 IntermediateSerializer
callback ContentTypeSerializer.ChildCallback
value object

ScanChildren(IntermediateSerializer, ChildCallback, T)

protected virtual void ScanChildren(IntermediateSerializer serializer, ContentTypeSerializer.ChildCallback callback, T value)

Parameters

serializer IntermediateSerializer
callback ContentTypeSerializer.ChildCallback
value T

Serialize(IntermediateWriter, object, ContentSerializerAttribute)

protected override void Serialize(IntermediateWriter output, object value, ContentSerializerAttribute format)

Parameters

output IntermediateWriter
value object
format ContentSerializerAttribute

Serialize(IntermediateWriter, T, ContentSerializerAttribute)

protected abstract void Serialize(IntermediateWriter output, T value, ContentSerializerAttribute format)

Parameters

output IntermediateWriter
value T
format ContentSerializerAttribute