GraphLinkCollection::GetOrCreate Method (GraphNode^, GraphNode^, String^, GraphCategory^)

 

Gets the link from the specified source to the specified target node. If not found, a new link will be created.

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

public:
GraphLink^ GetOrCreate(
	GraphNode^ source,
	GraphNode^ target,
	String^ label,
	GraphCategory^ category
)

Parameters

source
Type: Microsoft.VisualStudio.GraphModel::GraphNode^

source node

target
Type: Microsoft.VisualStudio.GraphModel::GraphNode^

target node

label
Type: System::String^

displayable label of the link

category
Type: Microsoft.VisualStudio.GraphModel::GraphCategory^

link category

Return Value

Type: Microsoft.VisualStudio.GraphModel::GraphLink^

the link that was found or created

Return to top
Show: