GraphLinkCollection.GetOrCreate Method (String, String, Int32)
Attempts to get the link with the specified source, target and multilink index 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 ( _
sourceId As String, _
targetId As String, _
index As Integer _
) As GraphLink
public GraphLink GetOrCreate(
string sourceId,
string targetId,
int index
)
public:
GraphLink^ GetOrCreate(
String^ sourceId,
String^ targetId,
int index
)
member GetOrCreate :
sourceId:string *
targetId:string *
index:int -> GraphLink
public function GetOrCreate(
sourceId : String,
targetId : String,
index : int
) : GraphLink
Parameters
sourceId
Type: StringThe source node id
targetId
Type: StringThe target node id
index
Type: Int32The link index, which gives you multiple links between the same source and target node
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.