示例#1
0
        /// <note>
        ///     Raises a vertexRemoved event.
        /// </note>
        public void RemoveVertex(IVertex vertex)
        {
            GraphContract.ValidateRemoveVertex(vertex);
            var vertexToRemove = vertex;

            if (vertex is EventVertex)
            {
                vertexToRemove = (vertex as EventVertex).Vertex;
            }

            var props = vertex.GetProperties();

            if (vertexToRemove != null)
            {
                BaseGraph.RemoveVertex(vertexToRemove);
                OnVertexRemoved(vertex, props);
            }
        }
示例#2
0
        public virtual void RemoveVertex(IVertex vertex)
        {
            GraphContract.ValidateRemoveVertex(vertex);

            foreach (var edge in vertex.GetEdges(Direction.Both))
            {
                RemoveEdge(edge);
            }

            VertexKeyIndex.RemoveElement(vertex);
            foreach (var idx in GetIndices().Where(t => t.Type == typeof(IVertex)).Cast <TinkerIndex>())
            {
                idx.RemoveElement(vertex);
            }

            IVertex removedVertex;

            InnerVertices.TryRemove(vertex.Id.ToString(), out removedVertex);
        }
示例#3
0
 public void RemoveVertex(IVertex vertex)
 {
     GraphContract.ValidateRemoveVertex(vertex);
     _graph.RemoveVertex(vertex);
 }
示例#4
0
 public void RemoveVertex(IVertex vertex)
 {
     GraphContract.ValidateRemoveVertex(vertex);
     BaseGraph.RemoveVertex(((PartitionVertex)vertex).Vertex);
 }
示例#5
0
 public void RemoveVertex(IVertex vertex)
 {
     GraphContract.ValidateRemoveVertex(vertex);
     VerifyNativeElement(vertex);
     _baseGraph.RemoveVertex(((IdVertex)vertex).GetBaseVertex());
 }
 public void RemoveVertex(IVertex vertex)
 {
     GraphContract.ValidateRemoveVertex(vertex);
     throw new InvalidOperationException(ReadOnlyTokens.MutateErrorMessage);
 }
示例#7
0
 public void RemoveVertex(IVertex vertex)
 {
     GraphContract.ValidateRemoveVertex(vertex);
     throw RetrievalNotSupported();
 }
示例#8
0
 public void RemoveVertex(IVertex vertex)
 {
     GraphContract.ValidateRemoveVertex(vertex);
     BaseGraph.RemoveVertex(((WrappedVertex)vertex).Vertex);
 }