GraphLinkCollection::GetOrCreate Method (GraphNodeId^, GraphNodeId^, Int32)

 

Attempts to get the link with the specified source, target and multi-link index.

If not found, a new link will be created.

It also creates the source and target Node if those are not already defined (and these are created with no category).

Namespace:   Microsoft.VisualStudio.GraphModel
Assembly:  Microsoft.VisualStudio.GraphModel (in Microsoft.VisualStudio.GraphModel.dll)

public:
GraphLink^ GetOrCreate(
	GraphNodeId^ sourceId,
	GraphNodeId^ targetId,
	int index
)

Parameters

sourceId
Type: Microsoft.VisualStudio.GraphModel::GraphNodeId^

The source node

targetId
Type: Microsoft.VisualStudio.GraphModel::GraphNodeId^

The target node

index
Type: System::Int32

The multi-link index

Return Value

Type: Microsoft.VisualStudio.GraphModel::GraphLink^

The Link that was found or created

Return to top
Show: