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.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.GraphModel.GraphNodeCollection
Namespace: Microsoft.VisualStudio.GraphModel
Assembly: Microsoft.VisualStudio.GraphModel (in Microsoft.VisualStudio.GraphModel.dll)
Syntax
'Declaration
Public NotInheritable Class GraphNodeCollection _
Implements ICollection(Of GraphNode), IReadOnlyCollection(Of GraphNode), _
IEnumerable(Of GraphNode), IEnumerable, IHasGraphOwner
public sealed class GraphNodeCollection : ICollection<GraphNode>,
IReadOnlyCollection<GraphNode>, IEnumerable<GraphNode>, IEnumerable,
IHasGraphOwner
public ref class GraphNodeCollection sealed : ICollection<GraphNode^>,
IReadOnlyCollection<GraphNode^>, IEnumerable<GraphNode^>, IEnumerable,
IHasGraphOwner
[<Sealed>]
type GraphNodeCollection =
class
interface ICollection<GraphNode>
interface IReadOnlyCollection<GraphNode>
interface IEnumerable<GraphNode>
interface IEnumerable
interface IHasGraphOwner
end
public final class GraphNodeCollection implements ICollection<GraphNode>, IReadOnlyCollection<GraphNode>, IEnumerable<GraphNode>, IEnumerable, IHasGraphOwner
The GraphNodeCollection type exposes the following members.
Properties
Name | Description | |
---|---|---|
Containers | Returns an enumerable which consists of all nodes that are containers. | |
Count | Return the number of nodes in the collection. | |
Graph | Gets the Graph associated with this nodes collection | |
IsReadOnly | Gets a value indicating whether the System.Collections.Generic.ICollection is read-only. | |
Item | Gets the Node using the given id. Throws exception on set if another node with the same id already exists. | |
Owner | Gets the Graph associated with this nodes collection |
Top
Methods
Name | Description | |
---|---|---|
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. | |
Clear | Remove all nodes in the collection | |
Contains | Determines if the given node is in this collection | |
CopyTo | Copies the elements of the System.Collections.Generic.ICollection to an System.Array, starting at a particular System.Array index. | |
CreateNew | Add 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. | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Get(String) | Gets the node with the specified id | |
Get(GraphNodeId) | Gets the node with the specified id | |
GetByCategory(array<String[]) | Returns all nodes in the graph that have the specified categories | |
GetByCategory(array<GraphCategory[]) | Returns all nodes in the graph that have the specified categories. | |
GetByProperty | Returns all nodes in the graph that have the specified property value. | |
GetEnumerator | Gets the typed enumerator for this collection | |
GetFiltered | Returns all nodes in the graph that match according to the given filter | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetOrCreate(String) | Attempts to get the node with the specified id. If not found, it will create a new node. | |
GetOrCreate(GraphNodeId) | Attempts to get the node with the specified id. If not found, it will create a new node. | |
GetOrCreate(String, String, GraphCategory) | Attempts to get the node with the specified id. If not found, it will create a new node. | |
GetOrCreate(GraphNodeId, String, GraphCategory) | Attempts to get the node with the specified id. If not found, it will create a new node. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Remove(String) | Remove the specified node | |
Remove(GraphNode) | Removes the first occurrence of a specific object from the System.Collections.Generic.ICollection. | |
Remove(IEnumerable<GraphNode>) | Remove all the nodes in the given set. | |
Remove(GraphNodeId) | Remove the specified node | |
Remove(GraphNode, GraphNode%) | Remove the specified node | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Events
Name | Description | |
---|---|---|
Added | This event is raised immediately when a new node is added to the collection. | |
Removed | This event is raised immediately when a node is removed from the collection. |
Top
Explicit Interface Implementations
Name | Description | |
---|---|---|
IEnumerable.GetEnumerator | Gets the enumerator for this collection |
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.