ValueSerializer.TypeReferences(Object, IValueSerializerContext) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets an enumeration of the types referenced by the ValueSerializer.
public:
virtual System::Collections::Generic::IEnumerable<Type ^> ^ TypeReferences(System::Object ^ value, System::Windows::Markup::IValueSerializerContext ^ context);
public virtual System.Collections.Generic.IEnumerable<Type> TypeReferences (object value, System.Windows.Markup.IValueSerializerContext context);
abstract member TypeReferences : obj * System.Windows.Markup.IValueSerializerContext -> seq<Type>
override this.TypeReferences : obj * System.Windows.Markup.IValueSerializerContext -> seq<Type>
Public Overridable Function TypeReferences (value As Object, context As IValueSerializerContext) As IEnumerable(Of Type)
Parameters
- value
- Object
The value being serialized.
- context
- IValueSerializerContext
Context information that is used for conversion.
Returns
The types converted by this serializer.
Remarks
Any types a ValueSerializer converts should be included in the returned enumeration. This allows a serializer to ensure a de-serializer has enough information about the types this serializer converts.
Overriding this method is an advanced scenario. Overriding should only be necessary if you are implementing a system where CLR type system ownertype-property relationships available to a XAML schema context do not report enough information.
WPF Usage Notes
The WPF property system implements an internal value serializer that overrides TypeReferences because a dependency property has a concept that it can have added owners. WPF expressions also have special internal handling.