Show / Hide Table of Contents

Class ObjectSerializer

Inheritance
System.Object
ObjectSerializer
CachedObjectSerializer
ClassSerializer
MigrationChainSerializer
MigrationTypeSerializer
ReferencedObjectSerializerRoot
Implements
IReferenceableSerializer
ISerializer
Namespace: Eco.Core.Serialization.Serializers
Assembly: Eco.Core.dll
Syntax
public class ObjectSerializer : Object, IReferenceableSerializer, ISerializer

Constructors

ObjectSerializer(SimpleSerializer)

Declaration
public ObjectSerializer(SimpleSerializer parent)
Parameters
Type Name Description
SimpleSerializer parent

ObjectSerializer(SimpleSerializer, Type, String, Dictionary<String, String>)

Declaration
protected ObjectSerializer(SimpleSerializer parent, Type type, string schemaType, Dictionary<string, string> membersSchema)
Parameters
Type Name Description
SimpleSerializer parent
System.Type type
System.String schemaType
System.Collections.Generic.Dictionary<System.String, System.String> membersSchema

ObjectSerializer(SimpleSerializer, Type, String, Dictionary<String, String>, IObjectReferenceService)

Declaration
protected ObjectSerializer(SimpleSerializer parent, Type type, string schemaType, Dictionary<string, string> membersSchema, IObjectReferenceService referenceService)
Parameters
Type Name Description
SimpleSerializer parent
System.Type type
System.String schemaType
System.Collections.Generic.Dictionary<System.String, System.String> membersSchema
IObjectReferenceService referenceService

Fields

parent

Declaration
protected SimpleSerializer parent
Field Value
Type Description
SimpleSerializer

Properties

ID

Declaration
public ref int ID { get; }
Property Value
Type Description
System.Int32

IsNullableType

Declaration
public bool IsNullableType { get; protected set; }
Property Value
Type Description
System.Boolean

ReferenceService

Declaration
public IObjectReferenceService ReferenceService { get; protected set; }
Property Value
Type Description
IObjectReferenceService

Schema

Declaration
public Dictionary<string, string> Schema { get; protected set; }
Property Value
Type Description
System.Collections.Generic.Dictionary<System.String, System.String>

SchemaType

Declaration
public string SchemaType { get; protected set; }
Property Value
Type Description
System.String

Type

Declaration
public Type Type { get; protected set; }
Property Value
Type Description
System.Type

Methods

Decode(BinaryReader)

Declaration
public object Decode(BinaryReader reader)
Parameters
Type Name Description
System.IO.BinaryReader reader
Returns
Type Description
System.Object

DecodeInstance(BinaryReader)

Declaration
protected virtual object DecodeInstance(BinaryReader reader)
Parameters
Type Name Description
System.IO.BinaryReader reader
Returns
Type Description
System.Object

DecodeObject(BinaryReader, Int32)

Declaration
protected virtual DecodedObject DecodeObject(BinaryReader reader, int objTypeID)
Parameters
Type Name Description
System.IO.BinaryReader reader
System.Int32 objTypeID
Returns
Type Description
DecodedObject

DecodeReferenceable(BinaryReader)

Declaration
public DecodedObject DecodeReferenceable(BinaryReader reader)
Parameters
Type Name Description
System.IO.BinaryReader reader
Returns
Type Description
DecodedObject

DecodeToArray(BinaryReader, Array, Int32)

Declaration
public void DecodeToArray(BinaryReader reader, Array array, int index)
Parameters
Type Name Description
System.IO.BinaryReader reader
System.Array array
System.Int32 index

DecodeToMember(BinaryReader, Object, MemberInfo)

Declaration
public void DecodeToMember(BinaryReader reader, object instance, MemberInfo memberInfo)
Parameters
Type Name Description
System.IO.BinaryReader reader
System.Object instance
MemberInfo memberInfo

Encode(BinaryWriter, Object, SerializeFlags)

Declaration
public virtual void Encode(BinaryWriter writer, object instance, SerializeFlags flags)
Parameters
Type Name Description
System.IO.BinaryWriter writer
System.Object instance
SerializeFlags flags

EncodeInstance(BinaryWriter, Object, SerializeFlags)

Declaration
protected virtual void EncodeInstance(BinaryWriter writer, object instance, SerializeFlags flags)
Parameters
Type Name Description
System.IO.BinaryWriter writer
System.Object instance
SerializeFlags flags

EncodeWith(ISerializer, BinaryWriter, Object, SerializeFlags)

This method may be used by inheritors and other classes from same module for more controlled serialization.

Declaration
protected void EncodeWith(ISerializer serializer, BinaryWriter writer, object instance, SerializeFlags flags)
Parameters
Type Name Description
ISerializer serializer

Exact serializer to be used for instance encoding.

System.IO.BinaryWriter writer

binary writer.

System.Object instance

instance to be encoded.

SerializeFlags flags

Skip(BinaryReader)

Declaration
public void Skip(BinaryReader reader)
Parameters
Type Name Description
System.IO.BinaryReader reader

SkipInstance(BinaryReader)

Declaration
protected virtual void SkipInstance(BinaryReader reader)
Parameters
Type Name Description
System.IO.BinaryReader reader

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String

Implements

IReferenceableSerializer
ISerializer

Extension Methods

PropertyChanges.FirePropertyChanged(Object, String)
PropertyChanges.FirePropertyChanged(Object, String, Object, Object)
PropertyChanges.FirePropertyChanged(Object, MemberChangedBeforeAfterEventArgs)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾