GraphNodeCollection::GetOrCreate Method (GraphNodeId^, String^, GraphCategory^)
Visual Studio 2015
Attempts to get the node with the specified id. If not found, it will create a new node.
Assembly: Microsoft.VisualStudio.GraphModel (in Microsoft.VisualStudio.GraphModel.dll)
Parameters
- id
-
Type:
Microsoft.VisualStudio.GraphModel::GraphNodeId^
The Id of the node
- label
-
Type:
System::String^
The displayable label of the node
- category
-
Type:
Microsoft.VisualStudio.GraphModel::GraphCategory^
An initial category to add to the node
| Exception | Condition |
|---|---|
| InvalidOperationException | Thrown if a node with same id already exists, but is of a different node type |
Show: