共用方式為


GraphLinkCollection.GetOrCreate 方法 (GraphNode, GraphNode, String, GraphCategory)

取得從指定來源到指定目標節點的連結。如果找不到,將會建立新的連結。

命名空間:  Microsoft.VisualStudio.GraphModel
組件:  Microsoft.VisualStudio.GraphModel (在 Microsoft.VisualStudio.GraphModel.dll 中)

語法

'宣告
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

參數

傳回值

型別:Microsoft.VisualStudio.GraphModel.GraphLink
找到或建立的連結

.NET Framework 安全性

請參閱

參考

GraphLinkCollection 類別

GetOrCreate 多載

Microsoft.VisualStudio.GraphModel 命名空間