Class SerializationService
Manages the (de)serialization of diagrams and diagram elements.
Inherited Members
Namespace: Telerik.Windows.Diagrams.Core
Assembly: Telerik.WinControls.RadDiagram.dll
Syntax
public class SerializationService : GraphServiceBase, ISerializationService
Constructors
SerializationService(IGraphInternal)
Initializes a new instance of the SerializationService class.
Declaration
public SerializationService(IGraphInternal graph)
Parameters
IGraphInternal
graph
The graph. |
Properties
Default
Gets the default Intermediate, not associated with any Graph.
Declaration
public static SerializationService Default { get; }
Property Value
SerializationService
|
Methods
CreateIConnectionInstance(Type)
Declaration
protected virtual IConnection CreateIConnectionInstance(Type connectionType)
Parameters
System.Type
connectionType
|
Returns
IConnection
|
CreateIShapeInstance(Type)
Declaration
protected virtual IShape CreateIShapeInstance(Type shapeType)
Parameters
System.Type
shapeType
|
Returns
IShape
|
Deserialize(SerializationInfo)
Loads the specified serialization info.
Declaration
public virtual IEnumerable<IDiagramItem> Deserialize(SerializationInfo serializationInfo)
Parameters
SerializationInfo
serializationInfo
The serialization info. |
Returns
System.Collections.Generic.IEnumerable<IDiagramItem>
|
Implements
DeserializeItems(SerializationInfo, Boolean)
Deserializes the items.
Declaration
public virtual IEnumerable<IDiagramItem> DeserializeItems(SerializationInfo serializationInfo, bool makeUnique = false)
Parameters
SerializationInfo
serializationInfo
The serialization info. |
System.Boolean
makeUnique
If set to |
Returns
System.Collections.Generic.IEnumerable<IDiagramItem>
|
Implements
GetMetadataId(SerializationInfo)
Gets the metadata id.
Declaration
public virtual string GetMetadataId(SerializationInfo serializationInfo)
Parameters
SerializationInfo
serializationInfo
The serialization info. |
Returns
System.String
|
Implements
Serialize()
Serializes the diagram.
Declaration
public virtual SerializationInfo Serialize()
Returns
SerializationInfo
|
Implements
SerializeConnections(IEnumerable<IConnection>)
Serializes the connections.
Declaration
public virtual XElement SerializeConnections(IEnumerable<IConnection> connections)
Parameters
System.Collections.Generic.IEnumerable<IConnection>
connections
The connections. |
Returns
System.Xml.Linq.XElement
|
Implements
SerializeGroups(IEnumerable<IGroupable>, IList<IGroup>, XElement)
Serializes the groups.
Declaration
public virtual XElement SerializeGroups(IEnumerable<IGroupable> items, IList<IGroup> serializedGroups, XElement groupsElement)
Parameters
System.Collections.Generic.IEnumerable<IGroupable>
items
The items. |
System.Collections.Generic.IList<IGroup>
serializedGroups
The serialized groups. |
System.Xml.Linq.XElement
groupsElement
The groups element. |
Returns
System.Xml.Linq.XElement
|
Implements
SerializeItems(IEnumerable<IDiagramItem>)
Serializes the given items.
Declaration
public virtual SerializationInfo SerializeItems(IEnumerable<IDiagramItem> items)
Parameters
System.Collections.Generic.IEnumerable<IDiagramItem>
items
The items to serialize. |
Returns
SerializationInfo
A SerializationInfo instance. |
Implements
SerializeShapes(IEnumerable<IShape>)
Serializes the shapes.
Declaration
public virtual XElement SerializeShapes(IEnumerable<IShape> shapes)
Parameters
System.Collections.Generic.IEnumerable<IShape>
shapes
The shapes to serialize. |
Returns
System.Xml.Linq.XElement
|
Implements
Events
ItemDeserializing
Occurs on item deserializing.
Declaration
public event EventHandler<SerializationEventArgs<IDiagramItem>> ItemDeserializing
Event Type
System.EventHandler<SerializationEventArgs<IDiagramItem>>
|
ItemSerializing
Occurs on item serializing.
Declaration
public event EventHandler<SerializationEventArgs<IDiagramItem>> ItemSerializing
Event Type
System.EventHandler<SerializationEventArgs<IDiagramItem>>
|