Udostępnij za pośrednictwem


GraphNodeCollection.Add Method

Definition

Overloads

Add(GraphNode)

Adds a link to the graph, or merge it with an existing Link object

Add(IEnumerable<GraphNode>)

Add all the nodes in the given set.

Add(GraphNode, GraphNode)

Adds the specified node to the graph.

Add(GraphNode)

Adds a link to the graph, or merge it with an existing Link object

public:
 virtual void Add(Microsoft::VisualStudio::GraphModel::GraphNode ^ item);
public void Add (Microsoft.VisualStudio.GraphModel.GraphNode item);
abstract member Add : Microsoft.VisualStudio.GraphModel.GraphNode -> unit
override this.Add : Microsoft.VisualStudio.GraphModel.GraphNode -> unit
Public Sub Add (item As GraphNode)

Parameters

item
GraphNode

Link to add

Implements

Exceptions

thrown if link is null

thrown if target of link is not in the graph

Applies to

Add(IEnumerable<GraphNode>)

Add all the nodes in the given set.

public:
 void Add(System::Collections::Generic::IEnumerable<Microsoft::VisualStudio::GraphModel::GraphNode ^> ^ nodes);
public void Add (System.Collections.Generic.IEnumerable<Microsoft.VisualStudio.GraphModel.GraphNode> nodes);
member this.Add : seq<Microsoft.VisualStudio.GraphModel.GraphNode> -> unit
Public Sub Add (nodes As IEnumerable(Of GraphNode))

Parameters

nodes
IEnumerable<GraphNode>

The set of nodes to add.

Applies to

Add(GraphNode, GraphNode)

Adds the specified node to the graph.

public:
 bool Add(Microsoft::VisualStudio::GraphModel::GraphNode ^ node, [Runtime::InteropServices::Out] Microsoft::VisualStudio::GraphModel::GraphNode ^ % resultNode);
public bool Add (Microsoft.VisualStudio.GraphModel.GraphNode node, out Microsoft.VisualStudio.GraphModel.GraphNode resultNode);
member this.Add : Microsoft.VisualStudio.GraphModel.GraphNode * GraphNode -> bool
Public Function Add (node As GraphNode, ByRef resultNode As GraphNode) As Boolean

Parameters

node
GraphNode

Node to add

resultNode
GraphNode

The Node that was added

Returns

Exceptions

thrown if node is null

thrown if the unique node id already exists

Applies to