IContentSerializer Interface
Namespace: Stride.Core.Serialization.ContentsAssembly: Stride.Core.Serialization.dll
Serializer for high-level "chunk", used by ContentManager.
public interface IContentSerializer
Name | Description | |
---|---|---|
Properties | ||
ActualType | Gets the actual runtime type of object being serialized by Serialize(ContentSerializerContext, SerializationStream, Object). It could be different than SerializationType if a conversion happened. |
|
SerializationType | Gets the type stored on HDD. Usually matches ActualType, but sometimes it might be converted to a different format (i.e. a GPU Texture is saved as an Image). |
|
Methods | ||
Construct(ContentSerializerContext) | Constructs the specified object. This is useful if there is any cycle in the object graph reference. |
|
Serialize(ContentSerializerContext, SerializationStream, Object) | Serializes the specified object. |
Properties
ActualType
Gets the actual runtime type of object being serialized by Serialize(ContentSerializerContext, SerializationStream, Object). It could be different than SerializationType if a conversion happened.
Type ActualType { get; }
Property Value
Type | Description |
---|---|
System.Type | The actual type. |
SerializationType
Gets the type stored on HDD. Usually matches ActualType, but sometimes it might be converted to a different format (i.e. a GPU Texture is saved as an Image).
Type SerializationType { get; }
Property Value
Type | Description |
---|---|
System.Type | The type stored on HDD. |
Methods
Construct(ContentSerializerContext)
Constructs the specified object. This is useful if there is any cycle in the object graph reference.
object Construct(ContentSerializerContext context)
Parameters
Type | Name | Description |
---|---|---|
ContentSerializerContext | context | The context. |
Returns
Type | Description |
---|---|
System.Object | The newly built object. |
Serialize(ContentSerializerContext, SerializationStream, Object)
Serializes the specified object.
void Serialize(ContentSerializerContext context, SerializationStream stream, object obj)
Parameters
Type | Name | Description |
---|---|---|
ContentSerializerContext | context | The context. |
SerializationStream | stream | The stream. |
System.Object | obj | The object. |