Class SerializationExtensions
- Namespace
- CMS.DataEngine.Serialization
- Assembly
- CMS.DataEngine.dll
Extension methods for serialization and deserialization of BaseInfo.
public static class SerializationExtensions
- Inheritance
-
objectSerializationExtensions
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.")]
public static bool ContainsField(this ICollection<FailedMapping> failedMappings, string fieldName)
Parameters
failedMappingsICollection<FailedMapping>Collection of failed mappings (see DeserializationResult).
fieldNamestringName 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.")]
public static DeserializationResult Deserialize(this XmlElement element)
Parameters
elementXmlElementXML element containing all the object data
Returns
Exceptions
- ArgumentNullException
elementis 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.")]
public static IEnumerable<FailedMapping> SelectField(this ICollection<FailedMapping> failedMappings, string fieldName)
Parameters
failedMappingsICollection<FailedMapping>Collection of failed mappings (see DeserializationResult).
fieldNamestringName 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.")]
public static XmlElement Serialize(this BaseInfo infoObject)
Parameters
infoObjectBaseInfoInfo object to serialize
Returns
- XmlElement
Exceptions
- ArgumentNullException
infoObjectis null.