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

Provides an abstract base class for XML serialization converters that handle type conversion during serialization and deserialization.

Definition

Namespace:Telerik.WinControls.XmlSerialization

Assembly:Telerik.WinControls.dll

Syntax:

C#
public abstract class SerializationConverter

Inheritance: objectSerializationConverter

Constructors

C#
protected SerializationConverter()

Methods

When overridden in a derived class, converts the specified string value back to the property's native type during XML deserialization.

C#
public abstract object ConvertFromString(object propertyOwner, PropertyDescriptor property, string value)
Parameters:propertyOwnerobject

The object that owns the property being converted.

propertyPropertyDescriptor

The property descriptor for the property being converted.

valuestring

The string value to convert back to the native property type.

Returns:

object

The converted object value suitable for setting on the property.

When overridden in a derived class, converts the specified property value to its string representation for XML serialization.

C#
public abstract string ConvertToString(object propertyOwner, PropertyDescriptor property, object value)
Parameters:propertyOwnerobject

The object that owns the property being converted.

propertyPropertyDescriptor

The property descriptor for the property being converted.

valueobject

The property value to convert to a string.

Returns:

string

A string representation of the property value suitable for XML serialization.

When overridden in a derived class, gets the actual type that should be used for the specified property during serialization.

C#
public abstract Type GetActualPropertyType(object propertyOwner, PropertyDescriptor property)
Parameters:propertyOwnerobject

The object that owns the property.

propertyPropertyDescriptor

The property descriptor for the property.

Returns:

Type

The actual type to use for serialization, which may differ from the property's declared type.

Gets the RadProperty associated with the specified property, if available.

C#
public virtual RadProperty GetRadProperty(object propertyOwner, PropertyDescriptor property)
Parameters:propertyOwnerobject

The object that owns the property.

propertyPropertyDescriptor

The property descriptor for the property.

Returns:

RadProperty

The associated RadProperty, or null if not applicable.