Class ContentTypeSerializer
- Assembly
- MonoGame.Framework.Content.Pipeline.dll
Provides methods for serializing and deserializing a specific managed type.
public abstract class ContentTypeSerializer
- Inheritance
-
ContentTypeSerializer
- Derived
- Inherited Members
Constructors
ContentTypeSerializer(Type, string)
Initializes a new instance of the ContentTypeSerializer class.
protected ContentTypeSerializer(Type targetType, string xmlTypeName)
Parameters
Properties
CanDeserializeIntoExistingObject
Gets a value indicating whether this component may load data into an existing object or if it must it construct a new instance of the object before loading the data.
public virtual bool CanDeserializeIntoExistingObject { get; }
Property Value
TargetType
Gets the target type.
public Type TargetType { get; }
Property Value
XmlTypeName
Gets the XML shortcut name (XmlTypeName).
public string XmlTypeName { get; }
Property Value
Methods
Deserialize(IntermediateReader, ContentSerializerAttribute, object)
protected abstract object Deserialize(IntermediateReader input, ContentSerializerAttribute format, object existingInstance)
Parameters
inputIntermediateReaderformatContentSerializerAttributeexistingInstanceobject
Returns
Initialize(IntermediateSerializer)
protected virtual void Initialize(IntermediateSerializer serializer)
Parameters
serializerIntermediateSerializer
ObjectIsEmpty(object)
Queries whether an object contains data to be serialized.
public virtual bool ObjectIsEmpty(object value)
Parameters
valueobjectThe object to test.
Returns
- bool
trueif the object is empty; otherwise,false.
ScanChildren(IntermediateSerializer, ChildCallback, object)
protected virtual void ScanChildren(IntermediateSerializer serializer, ContentTypeSerializer.ChildCallback callback, object value)
Parameters
serializerIntermediateSerializercallbackContentTypeSerializer.ChildCallbackvalueobject
Serialize(IntermediateWriter, object, ContentSerializerAttribute)
protected abstract void Serialize(IntermediateWriter output, object value, ContentSerializerAttribute format)
Parameters
outputIntermediateWritervalueobjectformatContentSerializerAttribute