/// <summary>
 /// Creates a new single edge update definition
 /// </summary>
 /// <param name="myCommentUpdate">A comment for the graphelemen</param>
 /// <param name="myUpdatedStructuredProperties">The structured properties</param>
 /// <param name="myUpdatedUnstructuredProperties">The unstructured properties</param>
 /// <param name="myUpdatedVector">Defines the single edge that should be updated</param>
 public SingleEdgeUpdateDefinition(
     VertexInformation mySourceVertex,
     VertexInformation myTargetVertex,
     long myEdgeTypeID,
     String myCommentUpdate = null,
     StructuredPropertiesUpdate myUpdatedStructuredProperties = null,
     UnstructuredPropertiesUpdate myUpdatedUnstructuredProperties = null)
     : base(myCommentUpdate, myUpdatedStructuredProperties, myUpdatedUnstructuredProperties)
 {
     SourceVertex = mySourceVertex;
     TargetVertex = myTargetVertex;
     EdgeTypeID = myEdgeTypeID;
 }
    TryCalculateVertexInformations
    (
        IGraph oGraphClone,
        BackgroundWorker oBackgroundWorker,
        out Dictionary<IVertex, VertexInformation> oVertexInformations
    )
    {
        Debug.Assert(oGraphClone != null);
        Debug.Assert(oBackgroundWorker != null);
        AssertValid();

        Int32 iCalculationsCompleted = 0;
        IVertexCollection oVertices = oGraphClone.Vertices;
        Int32 iVertices = oVertices.Count;

        oVertexInformations =
            new Dictionary<IVertex, VertexInformation>(iVertices);

        foreach (IVertex oVertex in oVertices)
        {
            if ( CancellationPending(oBackgroundWorker, iCalculationsCompleted,
                iVertices, "Calculating vertex areas.") )
            {
                return (false);
            }

            VertexDrawingHistory oVertexDrawingHistory;

            if ( !DrawerBase.TryGetVertexDrawingHistory(oVertex,
                out oVertexDrawingHistory) )
            {
                Debug.Assert(false);
            }

            Geometry oBounds = oVertexDrawingHistory.GetBounds();
            WpfGraphicsUtil.FreezeIfFreezable(oBounds);

            VertexInformation oVertexInformation = new VertexInformation();
            oVertexInformation.Bounds = oBounds;
            oVertexInformation.Area = GetArea(oBounds);

            oVertexInformations.Add(oVertex, oVertexInformation);

            iCalculationsCompleted++;
        }

        return (true);
    }
 /// <summary>
 /// Creates a new instance of SingleEdgeDeleteDefinition.
 /// </summary>
 /// <param name="mySourceVertex">The vertex where the edge begins.</param>
 /// <param name="myTargetVertex">The vertex where the edge ends.</param>
 public SingleEdgeDeleteDefinition(VertexInformation mySourceVertex, VertexInformation myTargetVertex)
 {
     SourceVertex = mySourceVertex;
     TargetVertex = myTargetVertex;
 }