Table of Contents

Class SerializationExtensions

Namespace
CMS.DataEngine.Serialization
Assembly
CMS.DataEngine.dll

Extension methods for serialization and deserialization of BaseInfo.

public static class SerializationExtensions
Inheritance
object
SerializationExtensions

Methods

ContainsField(ICollection<FailedMapping>, string)

Returns true if provided fieldName has at least one reference in the failedMappings collection.

[Obsolete("Method was not intended for public use and will be removed.")]
[ObsoleteSince(30, 0)]
public static bool ContainsField(this ICollection<FailedMapping> failedMappings, string fieldName)

Parameters

failedMappings ICollection<FailedMapping>

Collection of failed mappings (see DeserializationResult).

fieldName string

Name of field that might be present in the collection

Returns

bool

Remarks

fieldName comparison is case insensitive.

Deserialize(XmlElement)

Returns the XML element deserialized as a BaseInfo object.

[Obsolete("Method was not intended for public use and will be removed.")]
[ObsoleteSince(30, 0)]
public static DeserializationResult Deserialize(this XmlElement element)

Parameters

element XmlElement

XML element containing all the object data

Returns

DeserializationResult

Exceptions

ArgumentNullException

element is null.

SelectField(ICollection<FailedMapping>, string)

Selects only such FailedMappings which FieldName is same as fieldName from the failedMappings (comparison is case insensitive).

[Obsolete("Method was not intended for public use and will be removed.")]
[ObsoleteSince(30, 0)]
public static IEnumerable<FailedMapping> SelectField(this ICollection<FailedMapping> failedMappings, string fieldName)

Parameters

failedMappings ICollection<FailedMapping>

Collection of failed mappings (see DeserializationResult).

fieldName string

Name of field that which failed TranslationReferences should be selected.

Returns

IEnumerable<FailedMapping>

Remarks

fieldName comparison is case insensitive.

Serialize(BaseInfo)

Returns object data serialized into the XML element.

[Obsolete("Method was not intended for public use and will be removed.")]
[ObsoleteSince(30, 0)]
public static XmlElement Serialize(this BaseInfo infoObject)

Parameters

infoObject BaseInfo

Info object to serialize

Returns

XmlElement

Exceptions

ArgumentNullException

infoObject is null.