New to Telerik UI for WPFStart a free 30-day trial

Serialization class.

Definition

Constructors

Initializes a new instance of the Serializer class.

C#
public Serializer(PersistenceManager manager)
Parameters:managerPersistenceManager

The associated PersistenceManager instance.

Methods

Generates the property tree.

C#
protected virtual Collection<PropertyData> GeneratePropertyTree(object objectToSerialize, string path, ReferenceValue parentValue, PropertyData parentPropData, SerializationMetadataCollection options, bool shouldValidateCriteria, int nestingDepth)
Parameters:objectToSerializeobject

The object to serialize.

pathstring

The path.

parentValueReferenceValue

The parent value.

parentPropDataPropertyData

The parent prop data.

optionsSerializationMetadataCollection

The options.

shouldValidateCriteriabool

If set to true [should validate criteria].

nestingDepthint

The nesting depth.

Returns:

Collection<PropertyData>

Saves the property.

C#
protected virtual PropertyData SaveProperty(PropertyInfo property, string path, object obj, ReferenceValue parentValue, SerializationMetadataCollection options, bool shouldValidateCriteria, int nestingDepth, PropertyData parentPropData, MatchResult parentMatchResult)
Parameters:propertyPropertyInfo

The property.

pathstring

The path.

objobject

The object.

parentValueReferenceValue

The parent value.

optionsSerializationMetadataCollection

The options.

shouldValidateCriteriabool

If set to true [should validate criteria].

nestingDepthint

The nesting depth.

parentPropDataPropertyData

The parent prop data.

parentMatchResultMatchResult

The parent match result.

Returns:

PropertyData

Serializes a specific object.

C#
public Stream Serialize(object obj)
Parameters:objobject

The object to serialize.

Returns:

Stream

Returns a stream with the serialization data.

Implements: ISerializer.Serialize(object)

Serializes the specified objects.

C#
public Stream Serialize(params object[] obj)
Parameters:objobject[]

The objects to be serialized.

Returns:

Stream

Returns a stream with the serialization data.

Implements: ISerializer.Serialize(params object[])