ASP.NET Pack Programmer's Guide
IPersists Interface
Remarks See Also
 





Base interface for serializable MindFusion.Diagramming for WebForms objects.

Namespace: MindFusion.Diagramming
Package: MindFusion.Diagramming

 Syntax

C#  Copy Code

public interface IPersists

Visual Basic  Copy Code

Public Interface IPersists

 Remarks

Serializable MindFusion.Diagramming for WebForms classes implement explicitly this interface to hide it from the public. Explicit implementation however has the restrictions that the implemented methods are private and non-polymorphic. To avoid these limitations each implementing class provides another set of methods corresponding to the IPersists methods, which are declared as internal and retain polymorphism.

 Example

The following sample class illustrates this technique:

C#  Copy Code

class PersistingItem : IPersists
{
    int IPersists.GetClassId()
    {
        return GetClassIdInternal();
    }

    void IPersists.SaveTo(BinaryWriter writer, PersistContext ctx)
    {
        SaveToInternal(writer, ctx);
    }

    void IPersists.LoadFrom(BinaryReader reader, PersistContext ctx)
    {
        LoadFromInternal(reader, ctx);
    }

    void IPersists.SetReference(int refId, object obj)
    {
        SetReferenceInternal(refId, obj);
    }

    internal virtual int GetClassId()
    {
        return ClassId;
    }

    internal virtual void SaveTo(BinaryWriter writer, PersistContext ctx)
    {
    }

    internal virtual void LoadFrom(BinaryReader reader, PersistContext ctx)
    {
    }

    internal virtual void SetReference(int refId, object obj)
    {
    }
}

 Inheritors

MindFusion.Diagramming.AnchorPattern
MindFusion.Diagramming.AnchorPoint
MindFusion.Diagramming.ConnectionPoint
MindFusion.Diagramming.Diagram
MindFusion.Diagramming.DiagramItem
MindFusion.Diagramming.ElementTemplate
MindFusion.Diagramming.Group
MindFusion.Diagramming.Group.Attachment
MindFusion.Diagramming.HandlesVisualStyle
MindFusion.Diagramming.MapContent
MindFusion.Diagramming.NodeConstraints
MindFusion.Diagramming.NodeEffect
MindFusion.Diagramming.PersistableCollection(T)
MindFusion.Diagramming.PointCollection
MindFusion.Diagramming.Shape
MindFusion.Diagramming.ShapeData
MindFusion.Diagramming.Style
MindFusion.Diagramming.TableNode.Cell
MindFusion.Diagramming.TableNode.CellCollection
MindFusion.Diagramming.TableNode.Column
MindFusion.Diagramming.TableNode.ColumnCollection
MindFusion.Diagramming.TableNode.Row
MindFusion.Diagramming.TableNode.RowCollection
MindFusion.Diagramming.TreeViewItem
MindFusion.Diagramming.Lanes.Grid
MindFusion.Diagramming.Lanes.Header
MindFusion.Diagramming.Lanes.HeaderCollection
MindFusion.Diagramming.Lanes.Style

 See Also

IPersists Members
MindFusion.Diagramming Namespace