The event arguments used by HandleSerialization and HandleSerialization to let registered serialization code perform the serialization of items.
Inheritance Hierarchy
EventArgs
HandleSerializationEventArgs
Remarks
If the event handler determines that it can serialize the item, it should use the writer for output and mark the event as handled so that other code will not perform serialization, too.
Type Details
- yfiles module
- view-graphml
- yfiles-umd modules
- view-graphml, view
- Legacy UMD name
- yfiles.graphml.HandleSerializationEventArgs
Constructors
Initializes a new instance of the HandleSerializationEventArgs class using the provided context to write the item
using the given type for serialization.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- context - IWriteContext
- The context to use for writing.
- item - Object
- The item to to serialize.
- serializationType - Class
- The type that should be used for serialization, which needs to be a super type or interface of the
item
ornull
.
Properties
Gets the context to be used for writing.
Gets or sets a value indicating whether this HandleSerializationEventArgs is handled.
Gets the writer for writing the xml output.
Methods
Replaces the item using a substitute for serialization.
Remarks
This method can be used to replace the item and sourceType property so that the serialization chain can be traversed with a substituted item. If this method has been called the handled property should not be set to
true
.Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- item - Object
- The substitute to assign to the item property.
- serializationType - Class
- The serialization type to assign to the sourceType property.