Table of Contents

Method TypeReferences

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

TypeReferences(object, IValueSerializerContext)

Returns an enumeration of the types referenced by the value serializer. If the value serializer asks for a value serializer for System.Type, any types it asks to convert should be supplied in the returned enumeration. This allows a serializer to ensure a de-serializer has enough information about the types this serializer converts.

Since a value serializer doesn't exist by default, it is important the value serializer be requested from the IValueSerializerContext, not ValueSerializer.GetSerializerFor. This allows a serializer to encode context information (such as xmlns definitions) to the System.Type converter (for example, which prefix to generate).

public virtual IEnumerable<Type> TypeReferences(object value, IValueSerializerContext context)

Parameters

value object

The value being serialized

context IValueSerializerContext

Context information

Returns

IEnumerable<Type>

An enumeration of the types converted by this serializer