Table of Contents

Method GetSerializerFor

Namespace
Alternet.UI.Markup
Assembly
Alternet.UI.dll

GetSerializerFor(Type)

Get the value serializer declared for the given type.

public static ValueSerializer GetSerializerFor(Type type)

Parameters

type Type

The value type to serialize

Returns

ValueSerializer

The value serializer associated with the given type

GetSerializerFor(PropertyDescriptor)

Get the value serializer declared for the given property. ValueSerializer can be overriden by an attribute on the property declaration.

public static ValueSerializer GetSerializerFor(PropertyDescriptor descriptor)

Parameters

descriptor PropertyDescriptor

PropertyDescriptor for the property to be serialized

Returns

ValueSerializer

A value serializer associated with the given property

GetSerializerFor(Type, IValueSerializerContext)

Get the value serializer declared for the given type. This version should be called whenever the caller has a IValueSerializerContext to ensure that the correct value serializer is returned for the given context.

public static ValueSerializer GetSerializerFor(Type type, IValueSerializerContext context)

Parameters

type Type

The value type to serialize

context IValueSerializerContext

Context information

Returns

ValueSerializer

The value serializer associated with the given type

GetSerializerFor(PropertyDescriptor, IValueSerializerContext)

Get the value serializer declared for the given property. ValueSerializer can be overriden by an attribute on the property declaration. This version should be called whenever the caller has a IValueSerializerContext to ensure that the correct value serializer is returned for the given context.

public static ValueSerializer GetSerializerFor(PropertyDescriptor descriptor, IValueSerializerContext context)

Parameters

descriptor PropertyDescriptor

PropertyDescriptor for the property to be serialized

context IValueSerializerContext

Context information

Returns

ValueSerializer

A value serializer associated with the given property