Table of Contents

Class SerializationSettings

Namespace
CMS.DataEngine
Assembly
CMS.DataEngine.dll

Determines how the system serializes object fields from the database into XML files. Represents serialization settings in the type information of objects.

public class SerializationSettings
Inheritance
object
SerializationSettings
Extension Methods

Remarks

Use in the SerializationSettings property of ObjectTypeInfo.

Constructors

SerializationSettings(ObjectTypeInfo)

Constructor

public SerializationSettings(ObjectTypeInfo typeInfo)

Parameters

typeInfo ObjectTypeInfo

Related type information

Properties

AdditionalFieldFilter

Predicate for excluded field selection.

public Func<string, bool> AdditionalFieldFilter { get; set; }

Property Value

Func<string, bool>

Remarks

In case the list in ExcludedFieldNames is not sufficient and additional exclusion logic is required.

ExcludedFieldNames

List of field names that are excluded when serializing objects.

public ICollection<string> ExcludedFieldNames { get; }

Property Value

ICollection<string>

Remarks

By default, the system automatically excludes the object type's IDColumn, TimeStampColumn, VersionGUIDColumn and BinaryColumn.

StructuredFields

Lists fields that contain structured data and cannot directly be serialized as inner text values of XML elements. Maps an IStructuredField implementation to every listed field, which defines how the serialization occurs.

public IEnumerable<IStructuredField> StructuredFields { set; }

Property Value

IEnumerable<IStructuredField>

Methods

GetStructuredField(string)

Gets the structured field information for the field with the given name or null if the given field is not structured.

public IStructuredField GetStructuredField(string fieldName)

Parameters

fieldName string

Info field name

Returns

IStructuredField

IsExcludedField(string)

Returns true if the given object field name is excluded from the serialization.

public bool IsExcludedField(string fieldName)

Parameters

fieldName string

Info field name

Returns

bool

Remarks

Method is, by the nature of the values in ExcludedFieldNames, case insensitive.