GraphLinkCollection Class
Instances of this class manage a collection of Links. Ordering is not preserved.
Inheritance Hierarchy
Object
Microsoft.VisualStudio.GraphModel.GraphLinkCollection
Namespace: Microsoft.VisualStudio.GraphModel
Assembly: Microsoft.VisualStudio.GraphModel (in Microsoft.VisualStudio.GraphModel.dll)
Syntax
'Declaration
Public Class GraphLinkCollection _
Implements ICollection(Of GraphLink), IEnumerable(Of GraphLink), _
IEnumerable, IHasGraphOwner
public class GraphLinkCollection : ICollection<GraphLink>,
IEnumerable<GraphLink>, IEnumerable, IHasGraphOwner
public ref class GraphLinkCollection : ICollection<GraphLink^>,
IEnumerable<GraphLink^>, IEnumerable, IHasGraphOwner
type GraphLinkCollection =
class
interface ICollection<GraphLink>
interface IEnumerable<GraphLink>
interface IEnumerable
interface IHasGraphOwner
end
public class GraphLinkCollection implements ICollection<GraphLink>, IEnumerable<GraphLink>, IEnumerable, IHasGraphOwner
The GraphLinkCollection type exposes the following members.
Properties
Name | Description | |
---|---|---|
Count | Return the number of links in the collection. | |
Graph | Gets the Graph associated with this links collection | |
IsReadOnly | Gets a value indicating whether the System.Collections.Generic.ICollection is read-only. | |
Owner | Gets the Graph associated with this links collection |
Top
Methods
Name | Description | |
---|---|---|
Add(GraphLink) | Adds a link to the graph, or merge it with an existing Link object | |
Add(IEnumerable<GraphLink>) | Add all the links in the given set. | |
Add(GraphLink, GraphLink%) | Adds a link to the graph, or merge it with an existing Link object | |
Clear | Remove all links in this collection | |
Contains | Determines if the given link 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. | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
Get(String, String) | Gets the link with the specified source using node Id as strings | |
Get(GraphNode, GraphNode) | Gets the link with the specified source | |
Get(GraphNodeId, GraphNodeId) | Gets the link with the specified source using GraphNodeId | |
Get(String, String, Int32) | Gets the link with the specified source using node Id as strings and a multilink index | |
Get(GraphNode, GraphNode, Int32) | Gets the link with the specified source | |
Get(GraphNodeId, GraphNodeId, Int32) | Gets the link with the specified source and target and multi-link index | |
GetAll | Gets all links between the given source and target nodes. Each link must have a different Index. | |
GetByCategory | Returns all links in the graph that contain one or more of the specified categories. | |
GetByProperty | Returns all links 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 a hash function for a particular type. (Inherited from Object.) | |
GetLinksFrom | Get all links from the specified node ID that have at least one of the specified categories. | |
GetLinksTo | Get all links to the specified node ID have at least one of the specified categories. | |
GetOrCreate(String, GraphNodeId) | ||
GetOrCreate(String, String) | Attempts to get the link with the specified source, target. If not found, a new link will be created. It also creates the source and target Node if those are not already defined (and these are created with no category). | |
GetOrCreate(GraphNode, GraphNode) | Gets the link from the specified source to the specified target node. If not found, a new link will be created. | |
GetOrCreate(GraphNodeId, GraphNodeId) | Attempts to get the link with the specified source, target. If not found, a new link will be created. It also creates the source and target Node if those are not already defined (and these are created with no category). | |
GetOrCreate(GraphNodeId, String) | ||
GetOrCreate(String, String, Int32) | Attempts to get the link with the specified source, target and multilink index If not found, a new link will be created. | |
GetOrCreate(GraphNodeId, GraphNodeId, Int32) | Attempts to get the link with the specified source, target and multi-link index. If not found, a new link will be created. It also creates the source and target Node if those are not already defined (and these are created with no category). | |
GetOrCreate(String, String, String, GraphCategory) | Attempts to get the link with the specified source, target. If not found, a new link will be created. It also adds the specified category if it is not already defined. It also creates the source and target Node if those are not already defined (and these are created with no category). | |
GetOrCreate(GraphNode, GraphNode, String, GraphCategory) | Gets the link from the specified source to the specified target node. If not found, a new link will be created. | |
GetOrCreate(GraphNodeId, GraphNodeId, String, GraphCategory) | Attempts to get the link with the specified source, target. If not found, a new link will be created. It also adds the specified category if it is not already defined. It also creates the source and target Node if those are not already defined (and these are created with no category). | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Remove(GraphLink) | Removes the first occurrence of a specific object from the System.Collections.Generic.ICollection. | |
Remove(IEnumerable<GraphLink>) | Remove all the links in the given set. | |
Remove(GraphLink, GraphLink%) | Removes the first occurrence of a specific object from the System.Collections.Generic.ICollection. | |
Remove(String, String, GraphCategory) | Removes the given category from the link between source and target and if this is the last category, and then it removes the link also. | |
Remove(GraphNodeId, GraphNodeId, GraphCategory) | Removes the given category from the link between source and target and if this is the last category, and then it removes the link also. | |
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.