Class
Serializer

Serialization class.

Definition

Constructors

Serializer(PersistenceManager)

Initializes a new instance of the Serializer class.

Declaration

cs-api-definition
public Serializer(PersistenceManager manager)

Parameters

manager

PersistenceManager

The associated PersistenceManager instance.

Methods

GeneratePropertyTree(object, string, ReferenceValue, PropertyData, SerializationMetadataCollection, bool, int)

Generates the property tree.

Declaration

cs-api-definition
protected virtual Collection<PropertyData> GeneratePropertyTree(object objectToSerialize, string path, ReferenceValue parentValue, PropertyData parentPropData, SerializationMetadataCollection options, bool shouldValidateCriteria, int nestingDepth)

Parameters

objectToSerialize

object

The object to serialize.

path

string

The path.

parentValue

ReferenceValue

The parent value.

parentPropData

PropertyData

The parent prop data.

options

SerializationMetadataCollection

The options.

shouldValidateCriteria

bool

If set to true [should validate criteria].

nestingDepth

int

The nesting depth.

Returns

Collection<PropertyData>

SaveProperty(PropertyInfo, string, object, ReferenceValue, SerializationMetadataCollection, bool, int, PropertyData, MatchResult)

Saves the property.

Declaration

cs-api-definition
protected virtual PropertyData SaveProperty(PropertyInfo property, string path, object obj, ReferenceValue parentValue, SerializationMetadataCollection options, bool shouldValidateCriteria, int nestingDepth, PropertyData parentPropData, MatchResult parentMatchResult)

Parameters

property

PropertyInfo

The property.

path

string

The path.

obj

object

The object.

parentValue

ReferenceValue

The parent value.

options

SerializationMetadataCollection

The options.

shouldValidateCriteria

bool

If set to true [should validate criteria].

nestingDepth

int

The nesting depth.

parentPropData

PropertyData

The parent prop data.

parentMatchResult

MatchResult

The parent match result.

Returns

PropertyData

Serialize(object)

Serializes a specific object.

Declaration

cs-api-definition
public Stream Serialize(object obj)

Parameters

obj

object

The object to serialize.

Returns

Stream

Returns a stream with the serialization data.

Implements ISerializer.Serialize(object)

Serialize(params object[])

Serializes the specified objects.

Declaration

cs-api-definition
public Stream Serialize(params object[] obj)

Parameters

obj

object[]

The objects to be serialized.

Returns

Stream

Returns a stream with the serialization data.

Implements ISerializer.Serialize(params object[])