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:
VelocityGraph.Frontenac.Blueprints.Util
Assembly:
VelocityGraph (in VelocityGraph.dll) Version: 11.1.0.0 (11.1)
Syntax public static IVertex AddUniqueVertex(
this IIndexableGraph graph,
Object id,
IIndex index,
string uniqueKey,
Object uniqueValue
)
<ExtensionAttribute>
Public Shared Function AddUniqueVertex (
graph As IIndexableGraph,
id As Object,
index As IIndex,
uniqueKey As String,
uniqueValue As Object
) As IVertex
public:
[ExtensionAttribute]
static IVertex^ AddUniqueVertex(
IIndexableGraph^ graph,
Object^ id,
IIndex^ index,
String^ uniqueKey,
Object^ uniqueValue
)
[<ExtensionAttribute>]
static member AddUniqueVertex :
graph : IIndexableGraph *
id : Object *
index : IIndex *
uniqueKey : string *
uniqueValue : Object -> IVertex
Parameters
- graph
- Type: VelocityGraph.Frontenac.BlueprintsIIndexableGraph
the graph to add the vertex to - id
- Type: SystemObject
the id of the vertex to create (can be null) - index
- Type: VelocityGraph.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:
IVertexthe 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