Share via


GraphNodeIdCollection 類別

包含 GraphNodeIds 清單。 這可以存放在 GraphNodeId 的 .Value 部位內。 一旦建立,這是不變的清單。 我們會使用抽象類別,因為這個類別並不知道要將清單序列化回字串時所需使用的格式。

衍生的類別都知道這點。

繼承階層架構

Object
  Microsoft.VisualStudio.GraphModel.GraphNodeIdCollection

命名空間:  Microsoft.VisualStudio.GraphModel
組件:  Microsoft.VisualStudio.GraphModel (在 Microsoft.VisualStudio.GraphModel.dll 中)

語法

'宣告
Public Class GraphNodeIdCollection _
    Implements IEnumerable, IEnumerable(Of GraphNodeId),  _
    IComparable
public class GraphNodeIdCollection : IEnumerable, 
    IEnumerable<GraphNodeId>, IComparable
public ref class GraphNodeIdCollection : IEnumerable, 
    IEnumerable<GraphNodeId^>, IComparable
type GraphNodeIdCollection =  
    class 
        interface IEnumerable 
        interface IEnumerable<GraphNodeId>
        interface IComparable 
    end
public class GraphNodeIdCollection implements IEnumerable, IEnumerable<GraphNodeId>, IComparable

GraphNodeIdCollection 類型會公開下列成員。

建構函式

  名稱 描述
公用方法 GraphNodeIdCollection 建構 GraphNodeIdCollection。

回頁首

屬性

  名稱 描述
公用屬性 HomogeneousElements 陣列元素是同質 (陣列項目名稱都相同則迴圈不需要的,例如 Name=[item1,item2,item3]) 或是,所以]) 或異質的- (即 Name1=item1、Name2=item2, Name3=item3))
公用屬性 Item
公用屬性 Length 取得清單中的項目數

回頁首

方法

  名稱 描述
公用方法 CompareTo
公用方法 Equals 比較這些清單的其中兩個,以查看是否所有的項目都相等。 這是假設項目的順序會和清單內的順序相同。 這是一種效能最佳化,而且是方法引數所需,其中不同的順序表示不同的多載 (覆寫 Object.Equals(Object)。)
受保護的方法 Finalize 在記憶體回收開始前,允許物件嘗試釋放資源,並執行其他清除作業。 (繼承自 Object)。
公用方法 GetHashCode 計算這個集合的雜湊碼,並將其快取 (覆寫 Object.GetHashCode。)
公用方法 GetType 取得目前實例 Type 的屬性。 (繼承自 Object)。
公用方法 GetValueByName<T> 從符合名稱的第一個內嵌 GraphNodeId 取得值
受保護的方法 MemberwiseClone 建立目前 Object 的淺層複製 (Shallow Copy) 。 (繼承自 Object)。
公用方法 ToString 取得這個 GraphNodeId 集合,做為字串 (覆寫 Object.ToString。)

回頁首

明確介面實作

  名稱 描述
明確介面實作私用方法 IEnumerable<GraphNodeId>.GetEnumerator
明確介面實作私用方法 IEnumerable.GetEnumerator 取得我們的列舉程式。這樣無法直接存取 _array

回頁首

執行緒安全

這個類型的任何 Public static (在 Visual Basic 中為 Shared) 成員都是安全執行緒。不保證任何執行個體成員是安全執行緒。

請參閱

參考

Microsoft.VisualStudio.GraphModel 命名空間