Helper classes used during the XAML serialization of instances.
Inheritance Hierarchy
ValueSerializer
Remarks
Using this class instances can be written in xml attributes as strings.
Type Details
- yFiles module
- view
Methods
Determines whether this instance can convert the specified value from the given string.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- value - string
- The string value to convert.
- context - IValueSerializerContext
- The context.
Returns
- ↪boolean
true
if this instance can convert the specified value from the string; otherwise,false
.
Determines whether this instance can convert the specified value to a string.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- value - any
- The value.
- context - IValueSerializerContext
- The context.
Returns
- ↪boolean
true
if this instance can convert the specified value to a string; otherwise,false
.
Converts the string to an appropriate instance.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- value - string
- The value to convert to an object.
- context - IValueSerializerContext
- The context.
Returns
- ↪any?
- The converted object
Converts the given value to string.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- o - any
- The value.
- context - IValueSerializerContext
- The context.
Returns
- ↪string
- The value as string representation.
Static Methods
Gets the ValueSerializer implementation for the given descriptor.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- property - Property
- The descriptor.
- context - IValueSerializerContext
- The context.
Returns
- ↪ValueSerializer?
- The serializer to use for the descriptor.
Gets the ValueSerializer implementation for the given type.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- type - Constructor
- The type.
- context - IValueSerializerContext
- The context.
Returns
- ↪ValueSerializer?
- The serializer to use for the type.