New to Telerik UI for WPFStart a free 30-day trial

Represents a base class for a serializable graph source.

Definition

Namespace:Telerik.Windows.Controls.Diagrams.Extensions.ViewModels

Assembly:Telerik.Windows.Controls.Diagrams.Extensions.dll

Type Parameters:

TNode

The type of the node.

TLink

The type of the link.

Syntax:

C#
public abstract class SerializableGraphSourceBase<TNode, TLink> : ObservableGraphSourceBase<TNode, TLink>, INotifyPropertyChanged, IDisposable, ISerializableGraphSource, IObservableGraphSource, IGraphSource where TLink : ILink

Inheritance: objectViewModelBaseGraphSourceBase<TNode, TLink>ObservableGraphSourceBase<TNode, TLink>SerializableGraphSourceBase<TNode, TLink>

Implements: IDisposableIGraphSourceINotifyPropertyChangedIObservableGraphSourceISerializableGraphSource

Inherited Members ObservableGraphSourceBase<TNode, TLink>.CreateLink(object, object)ObservableGraphSourceBase<TNode, TLink>.CreateNode(IShape)GraphSourceBase<TNode, TLink>.AddNode(TNode)GraphSourceBase<TNode, TLink>.AddLink(TLink)GraphSourceBase<TNode, TLink>.RemoveLink(TLink)GraphSourceBase<TNode, TLink>.RemoveItem(TNode)GraphSourceBase<TNode, TLink>.Clear()GraphSourceBase<TNode, TLink>.InternalItemsGraphSourceBase<TNode, TLink>.InternalLinksGraphSourceBase<TNode, TLink>.ItemsGraphSourceBase<TNode, TLink>.LinksViewModelBase.VerifyPropertyName(string)ViewModelBase.UpdateValue<T>(ref T, T, string)ViewModelBase.InvokeOnUIThread(Action)ViewModelBase.Dispose()ViewModelBase.RaisePropertyChanged(string)ViewModelBase.OnPropertyChanged(string)ViewModelBase.OnPropertyChanged<T>(Expression<Func<T>>)ViewModelBase.Dispose(bool)ViewModelBase.PropertyChanged...

Constructors

C#
protected SerializableGraphSourceBase()

Properties

Cache for the deserialized nodes.

C#
protected Dictionary<string, TNode> CachedNodes { get; }

Gets the node unique id key. This key is used to save the unique id of the node in the serialization info.

C#
protected virtual string NodeUniqueIdKey { get; }

Gets the source unique id key. This key is used to save the unique id of the source of the link in the serialization info.

C#
protected virtual string SourceUniqueIdKey { get; }

Gets the target unique id key. This key is used to save the unique id of the target of the link in the serialization info.

C#
protected virtual string TargetUniqueIdKey { get; }

Methods

Clears the deserialization cache. The cache contains the generated items when deserializing the saved data. The cache should be cleared either before or after the deserialization of the graph source.

C#
public void ClearCache()

Deserializes the link. When overridden, this method creates a new instance of the link and restores any saved information from the serialization info.

C#
public virtual TLink DeserializeLink(IConnection connection, SerializationInfo info)
Parameters:connectionIConnection

The connection.

infoSerializationInfo

The info.

Returns:

TLink

Deserializes the node. When overridden, this method creates a new instance of the node and restores any saved information from the serialization info.

C#
public virtual TNode DeserializeNode(IShape shape, SerializationInfo info)
Parameters:shapeIShape

The shape.

infoSerializationInfo

The info.

Returns:

TNode

Gets the node's unique id. This id should be always unique and should not rely on the object's reference.

C#
public abstract string GetNodeUniqueId(TNode node)
Parameters:nodeTNode

The node.

Returns:

string

Serializes the link. When overridden, this method saves important information about the link in the specified serialization info.

C#
public virtual void SerializeLink(TLink link, SerializationInfo info)
Parameters:linkTLink

The link.

infoSerializationInfo

The info.

Serializes the node. When overridden, this method saves important information about the node in the specified serialization info.

C#
public virtual void SerializeNode(TNode node, SerializationInfo info)
Parameters:nodeTNode

The node.

infoSerializationInfo

The info.