GraphLinkCollection.GetOrCreate Method (GraphNode, GraphNode, String, GraphCategory)
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
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)
Syntax
'Declaration
Public Function GetOrCreate ( _
source As GraphNode, _
target As GraphNode, _
label As String, _
category As GraphCategory _
) As GraphLink
public GraphLink GetOrCreate(
GraphNode source,
GraphNode target,
string label,
GraphCategory category
)
public:
GraphLink^ GetOrCreate(
GraphNode^ source,
GraphNode^ target,
String^ label,
GraphCategory^ category
)
member GetOrCreate :
source:GraphNode *
target:GraphNode *
label:string *
category:GraphCategory -> GraphLink
public function GetOrCreate(
source : GraphNode,
target : GraphNode,
label : String,
category : GraphCategory
) : GraphLink
Parameters
source
Type: Microsoft.VisualStudio.GraphModel.GraphNodesource node
target
Type: Microsoft.VisualStudio.GraphModel.GraphNodetarget node
label
Type: System.Stringdisplayable label of the link
category
Type: Microsoft.VisualStudio.GraphModel.GraphCategorylink category
Return Value
Type: Microsoft.VisualStudio.GraphModel.GraphLink
the link that was found or created
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.