Share via


GraphNodeCollection.GetOrCreate Method (String, String, GraphCategory)

Attempts to get the node with the specified id. If not found, it will create a new node.

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

Syntax

'Declaration
Public Function GetOrCreate ( _
    id As String, _
    label As String, _
    category As GraphCategory _
) As GraphNode
public GraphNode GetOrCreate(
    string id,
    string label,
    GraphCategory category
)
public:
GraphNode^ GetOrCreate(
    String^ id, 
    String^ label, 
    GraphCategory^ category
)
member GetOrCreate : 
        id:string * 
        label:string * 
        category:GraphCategory -> GraphNode 
public function GetOrCreate(
    id : String, 
    label : String, 
    category : GraphCategory
) : GraphNode

Parameters

Return Value

Type: Microsoft.VisualStudio.GraphModel.GraphNode
the node that was found or created

.NET Framework Security

See Also

Reference

GraphNodeCollection Class

GetOrCreate Overload

Microsoft.VisualStudio.GraphModel Namespace