Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

GraphNodeCollection Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

This class provides methods for manipulating a collection of Nodes. This class does not preserve the order in which you added the nodes, so that when you enumerate them you will get them back in a random order.

System.Object
  Microsoft.VisualStudio.GraphModel.GraphNodeCollection

Namespace:  Microsoft.VisualStudio.GraphModel
Assembly:  Microsoft.VisualStudio.GraphModel (in Microsoft.VisualStudio.GraphModel.dll)
public sealed class GraphNodeCollection : ICollection<GraphNode>, 
	IReadOnlyCollection<GraphNode>, IEnumerable<GraphNode>, IEnumerable, 
	IHasGraphOwner

The GraphNodeCollection type exposes the following members.

  NameDescription
Public propertyContainersReturns an enumerable which consists of all nodes that are containers.
Public propertyCountReturn the number of nodes in the collection.
Public propertyGraphGets the Graph associated with this nodes collection
Public propertyIsReadOnlyGets a value indicating whether the System.Collections.Generic.ICollection is read-only.
Public propertyItemGets the Node using the given id. Throws exception on set if another node with the same id already exists.
Public propertyOwnerGets the Graph associated with this nodes collection
Top
  NameDescription
Public methodAdd(GraphNode)Adds a link to the graph, or merge it with an existing Link object
Public methodAdd(IEnumerable<GraphNode>)Add all the nodes in the given set.
Public methodAdd(GraphNode, GraphNode)Adds the specified node to the graph.
Public methodClearRemove all nodes in the collection
Public methodContainsDetermines if the given node is in this collection
Public methodCopyToCopies the elements of the System.Collections.Generic.ICollection to an System.Array, starting at a particular System.Array index.
Public methodCreateNewAdd a new node using the given base name format for the node. This method formats the given string with integer values until it finds an id that is not currently being used, and then creates a node with that id.
Public methodEqualsDetermines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodGet(String)Gets the node with the specified id
Public methodGet(GraphNodeId)Gets the node with the specified id
Public methodGetByCategory(String[])Returns all nodes in the graph that have the specified categories
Public methodGetByCategory(GraphCategory[])Returns all nodes in the graph that have the specified categories.
Public methodGetByPropertyReturns all nodes in the graph that have the specified property value.
Public methodGetEnumeratorGets the typed enumerator for this collection
Public methodGetFilteredReturns all nodes in the graph that match according to the given filter
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetOrCreate(String)Attempts to get the node with the specified id. If not found, it will create a new node.
Public methodGetOrCreate(GraphNodeId)Attempts to get the node with the specified id. If not found, it will create a new node.
Public methodGetOrCreate(String, String, GraphCategory)Attempts to get the node with the specified id. If not found, it will create a new node.
Public methodGetOrCreate(GraphNodeId, String, GraphCategory)Attempts to get the node with the specified id. If not found, it will create a new node.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodRemove(String)Remove the specified node
Public methodRemove(GraphNode)Removes the first occurrence of a specific object from the System.Collections.Generic.ICollection.
Public methodRemove(IEnumerable<GraphNode>)Remove all the nodes in the given set.
Public methodRemove(GraphNodeId)Remove the specified node
Public methodRemove(GraphNode, GraphNode)Remove the specified node
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top
  NameDescription
Public eventAddedThis event is raised immediately when a new node is added to the collection.
Public eventRemovedThis event is raised immediately when a node is removed from the collection.
Top
  NameDescription
Explicit interface implemetationPrivate methodIEnumerable.GetEnumeratorGets the enumerator for this collection
Top
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.