GraphLinkCollection Class
Instances of this class manage a collection of Links. Ordering is not preserved.
Inheritance Hierarchy
System.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
public class GraphLinkCollection : ICollection<GraphLink>,
IEnumerable<GraphLink>, IEnumerable
public ref class GraphLinkCollection : ICollection<GraphLink^>,
IEnumerable<GraphLink^>, IEnumerable
type GraphLinkCollection =
class
interface ICollection<GraphLink>
interface IEnumerable<GraphLink>
interface IEnumerable
end
public class GraphLinkCollection implements ICollection<GraphLink>, IEnumerable<GraphLink>, IEnumerable
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. |
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) | ||
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 | ||
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) | ||
GetOrCreate(GraphNodeId, String) | ||
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 its 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) | ||
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, then it removes the link as well. | |
Remove(GraphNodeId, GraphNodeId, GraphCategory) | ||
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Events
Name | Description | |
---|---|---|
LinksUpdated | Event implementation for LinksUpdated. We don't use an implicit C# event here because we want to only listen on the TransactedDictionaryChanges if there are clients listening on us. (For perf reasons). |
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.