Click or drag to resize

IndexableGraphHelpersAddUniqueVertex Method

Add a vertex to a graph only if no other vertex in the provided Index is indexed by the property key/value pair. If a vertex already exists with that key/value pair, return the pre-existing vertex.

Namespace:  Frontenac.Blueprints.Util
Assembly:  VelocityGraph (in VelocityGraph.dll) Version: 10.1.0.0 (10.1)
Syntax
public static IVertex AddUniqueVertex(
	this IIndexableGraph graph,
	Object id,
	IIndex index,
	string uniqueKey,
	Object uniqueValue
)

Parameters

graph
Type: Frontenac.BlueprintsIIndexableGraph
the graph to add the vertex to
id
Type: SystemObject
the id of the vertex to create (can be null)
index
Type: Frontenac.BlueprintsIIndex
the index to determine if another vertex with the same key/value exists
uniqueKey
Type: SystemString
the key to check on for uniqueness of the vertex
uniqueValue
Type: SystemObject
the value to check on for uniqueness of the vertex

Return Value

Type: IVertex
the newly created vertex or the vertex that satisfies the uniqueness criteria

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IIndexableGraph. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also