Class AssetObjectSerializerBackend
Internal class used when serializing/deserializing an object.
public class AssetObjectSerializerBackend : DefaultObjectSerializerBackend, IObjectSerializerBackend- Inheritance
- 
      objectDefaultObjectSerializerBackendAssetObjectSerializerBackend
- Implements
- 
      IObjectSerializerBackend
- Inherited Members
- 
    DefaultObjectSerializerBackend.GetStyle(ref ObjectContext)DefaultObjectSerializerBackend.ReadYaml(ref ObjectContext)DefaultObjectSerializerBackend.WriteYaml(ref ObjectContext)
Constructors
AssetObjectSerializerBackend(ITypeDescriptorFactory)
public AssetObjectSerializerBackend(ITypeDescriptorFactory typeDescriptorFactory)Parameters
- typeDescriptorFactoryITypeDescriptorFactory
Fields
ObjectReferencesKey
public static readonly PropertyKey<YamlAssetMetadata<Guid>> ObjectReferencesKeyField Value
OverrideDictionaryKey
public static readonly PropertyKey<YamlAssetMetadata<OverrideType>> OverrideDictionaryKeyField Value
Methods
GetCurrentPath(ref ObjectContext, bool)
public static YamlAssetPath GetCurrentPath(ref ObjectContext objectContext, bool clone)Parameters
- objectContextObjectContext
- clonebool
Returns
ReadCollectionItem(ref ObjectContext, object, Type, int)
Reads the collection item from the current YAML stream.
public override object ReadCollectionItem(ref ObjectContext objectContext, object value, Type itemType, int index)Parameters
- objectContextObjectContext
- The object context. 
- valueobject
- The value. 
- itemTypeType
- Type of the item. 
- indexint
Returns
- object
- The collection item read from YAML stream. 
ReadDictionaryKey(ref ObjectContext, Type)
Reads the key of the dictionary item from the current YAML stream.
public override object ReadDictionaryKey(ref ObjectContext objectContext, Type keyType)Parameters
- objectContextObjectContext
- The object context. 
- keyTypeType
- Type of the key. 
Returns
- object
- The key of the dictionary item read from YAML stream. 
ReadDictionaryValue(ref ObjectContext, Type, object)
Reads the value of the dictionary item from the current YAML stream.
public override object ReadDictionaryValue(ref ObjectContext objectContext, Type valueType, object key)Parameters
- objectContextObjectContext
- The object context. 
- valueTypeType
- Type of the value. 
- keyobject
- The key corresponding to the value. 
Returns
- object
- The value of the dictionary item read from YAML stream. 
ReadMemberName(ref ObjectContext, string, out bool)
Allows to transform the name of the member while reading for the specified object context.
public override string ReadMemberName(ref ObjectContext objectContext, string memberName, out bool skipMember)Parameters
- objectContextObjectContext
- The object context to which the member name. 
- memberNamestring
- Name of the member read from the current yaml stream. 
- skipMemberbool
Returns
- string
- The name that will be used to get the Stride.Core.Reflection.IMemberDescriptor from the current object context. 
ReadMemberValue(ref ObjectContext, IMemberDescriptor, object, Type)
Reads the value for the specified member from the current YAML stream.
public override object ReadMemberValue(ref ObjectContext objectContext, IMemberDescriptor memberDescriptor, object memberValue, Type memberType)Parameters
- objectContextObjectContext
- The object context. 
- memberDescriptorIMemberDescriptor
- memberValueobject
- The member value. See remarks 
- memberTypeType
- Type of the member. 
Returns
- object
- The value read from YAML stream. 
Remarks
TODO: Explain memberValue when can be not null
ShouldSerialize(IMemberDescriptor, ref ObjectContext)
Indicates if the given member should be serialized.
public override bool ShouldSerialize(IMemberDescriptor member, ref ObjectContext objectContext)Parameters
- memberIMemberDescriptor
- The member to evaluate. 
- objectContextObjectContext
- The object context. 
Returns
- bool
- True if the member should be serialized, False otherwise. 
WriteCollectionItem(ref ObjectContext, object, Type, int)
Writes the collection item.
public override void WriteCollectionItem(ref ObjectContext objectContext, object item, Type itemType, int index)Parameters
- objectContextObjectContext
- The object context. 
- itemobject
- The item. 
- itemTypeType
- Type of the item. 
- indexint
WriteDictionaryKey(ref ObjectContext, object, Type)
Writes the key of the dictionary item.
public override void WriteDictionaryKey(ref ObjectContext objectContext, object key, Type keyType)Parameters
- objectContextObjectContext
- The object context. 
- keyobject
- The key of the dictionary item. 
- keyTypeType
- Type of the key. 
WriteDictionaryValue(ref ObjectContext, object, object, Type)
Writes the value of the dictionary item.
public override void WriteDictionaryValue(ref ObjectContext objectContext, object key, object value, Type valueType)Parameters
- objectContextObjectContext
- The object context. 
- keyobject
- valueobject
- The value of the dictionary item. 
- valueTypeType
- Type of the value. 
WriteMemberName(ref ObjectContext, IMemberDescriptor, string)
Writes the name of the member.
public override void WriteMemberName(ref ObjectContext objectContext, IMemberDescriptor member, string memberName)Parameters
- objectContextObjectContext
- The object context. 
- memberIMemberDescriptor
- The member. 
- memberNamestring
- Name of the member. 
WriteMemberValue(ref ObjectContext, IMemberDescriptor, object, Type)
Writes the member value.
public override void WriteMemberValue(ref ObjectContext objectContext, IMemberDescriptor memberDescriptor, object memberValue, Type memberType)Parameters
- objectContextObjectContext
- The object context. 
- memberDescriptorIMemberDescriptor
- memberValueobject
- The member value. 
- memberTypeType
- Type of the member.