GraphNodeIdCollection Class

Definition

Contains a list of GraphNodeIds. This can be stored inside the .Value part of a GraphNodeId. This is an immutable list once created. We use an abstract class since this class does not know the formatting required to serialize the list back out to a string. The derived class will know this.

public ref class GraphNodeIdCollection : IComparable, System::Collections::Generic::IEnumerable<Microsoft::VisualStudio::GraphModel::GraphNodeId ^>
public class GraphNodeIdCollection : IComparable, System.Collections.Generic.IEnumerable<Microsoft.VisualStudio.GraphModel.GraphNodeId>
type GraphNodeIdCollection = class
    interface IEnumerable
    interface seq<GraphNodeId>
    interface IComparable
Public Class GraphNodeIdCollection
Implements IComparable, IEnumerable(Of GraphNodeId)
Inheritance
GraphNodeIdCollection
Implements

Constructors

GraphNodeIdCollection(Boolean, GraphNodeId[])

Construct a GraphNodeIdCollection.

Properties

HomogeneousElements

Whether the array elements are is homogeneous (array item names are all the same so no need repeating, e.g. Name=[item1,item2,item3]) or heterogeneous - e.g (Name1=item1, Name2=item2, Name3=item3))

Item[Int32]
Length

Get the number of items in the list

Methods

CompareTo(Object)
Equals(Object)

Compares to of these lists and see if all of the items are equal. This assumes the items will be in the same order inside the list. This is a performance optimization, and needed for method arguments, where a different order means a different overload

GetHashCode()

Computes the hash code for this collection and caches it

GetValueByName<T>(GraphNodeIdName)

Gets a value from the first embedded GraphNodeId that matches the name

ToString()

Gets this GraphNodeId collection as a string

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Get our Enumerator. This prevents direct access to the _array

IEnumerable<GraphNodeId>.GetEnumerator()

Get our typed Enumerator. This prevents direct access to the _array

Extension Methods

EmptyIfNull<T>(IEnumerable<T>)

Applies to