Enfusion Script API
Loading...
Searching...
No Matches
BaseSerializationContext Interface Reference

Base class for serialization contexts. More...

Inheritance diagram for BaseSerializationContext:
ScriptAndConfig Managed BaseSerializationLoadContext BaseSerializationSaveContext ContainerSerializationLoadContext BufferSerializationSaveContext ContainerSerializationSaveContext

Public Member Functions

proto external bool CanSeekMembers ()
 
proto external bool IsValid ()
 
proto external string GetDataExtension ()
 
proto external void ConfigureTypeDiscriminator (string fieldName="$type")
 Type discriminator is used to add polymorph object instance support to the serializer.
 
proto external bool EnableTypeDiscriminator (bool enabled)
 Enable or disable, can be used to pause it for a specific variable and resume after it was written.
 
proto external bool IsTypeDiscriminatorEnabled ()
 Is the type discrimiation currently enabled.
 
proto external void Reset ()
 Reset buffers to re-use for new data.
 
proto bool StartMap (string name, out int count)
 Start new map. Empty name will result in an anonymous map. Count must be known ahead of time.
 
proto external bool EndMap ()
 
proto bool StartArray (string name, out int count)
 Start new array. Empty name will result in an anonymous array. Count must be known ahead of time.
 
proto external bool EndArray ()
 
proto external bool StartObject (string name=string.Empty)
 Start new subobject. Empty name will result in an anonymous object.
 
proto external bool EndObject ()
 
- Public Member Functions inherited from Managed
proto external ref Managed Clone ()
 Return shallow copy of object, or null if it is not allowed (not public constructor)
 

Detailed Description

Base class for serialization contexts.

Member Function Documentation

◆ CanSeekMembers()

proto external bool BaseSerializationContext.CanSeekMembers ( )

◆ ConfigureTypeDiscriminator()

proto external void BaseSerializationContext.ConfigureTypeDiscriminator ( string fieldName = "$type")

Type discriminator is used to add polymorph object instance support to the serializer.

Type is written inside the object when saving. When the load happens, it creates the instance based on this type.

◆ EnableTypeDiscriminator()

proto external bool BaseSerializationContext.EnableTypeDiscriminator ( bool enabled)

Enable or disable, can be used to pause it for a specific variable and resume after it was written.

Returns
Previous value

◆ EndArray()

proto external bool BaseSerializationContext.EndArray ( )

◆ EndMap()

proto external bool BaseSerializationContext.EndMap ( )

◆ EndObject()

proto external bool BaseSerializationContext.EndObject ( )

◆ GetDataExtension()

proto external string BaseSerializationContext.GetDataExtension ( )

◆ IsTypeDiscriminatorEnabled()

proto external bool BaseSerializationContext.IsTypeDiscriminatorEnabled ( )

Is the type discrimiation currently enabled.

◆ IsValid()

proto external bool BaseSerializationContext.IsValid ( )

◆ Reset()

proto external void BaseSerializationContext.Reset ( )

Reset buffers to re-use for new data.

◆ StartArray()

proto bool BaseSerializationContext.StartArray ( string name,
out int count )

Start new array. Empty name will result in an anonymous array. Count must be known ahead of time.

◆ StartMap()

proto bool BaseSerializationContext.StartMap ( string name,
out int count )

Start new map. Empty name will result in an anonymous map. Count must be known ahead of time.

◆ StartObject()

proto external bool BaseSerializationContext.StartObject ( string name = string.Empty)

Start new subobject. Empty name will result in an anonymous object.


The documentation for this interface was generated from the following file: