共用方式為


IAnnotationDictionary 介面

代表自訂資料物件的字典,您可以將這些物件與 SharePoint 工具物件模型中的特定物件相關聯。

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

語法

'宣告
Public Interface IAnnotationDictionary _
    Inherits IDictionary(Of Object, Object), ICollection(Of KeyValuePair(Of Object, Object)),  _
    IEnumerable(Of KeyValuePair(Of Object, Object)), IEnumerable
public interface IAnnotationDictionary : IDictionary<Object, Object>, 
    ICollection<KeyValuePair<Object, Object>>, IEnumerable<KeyValuePair<Object, Object>>, 
    IEnumerable

IAnnotationDictionary 型別會公開下列成員。

屬性

  名稱 說明
公用屬性 Count 取得在 ICollection<T> 中所包含的元素數。 (繼承自 ICollection<KeyValuePair<Object, Object>>)。
公用屬性 IsReadOnly 取得值,這個值表示 ICollection<T> 是否為唯讀。 (繼承自 ICollection<KeyValuePair<Object, Object>>)。
公用屬性 Item 取得或設定具有指定索引鍵的元素。 (繼承自 IDictionary<Object, Object>)。
公用屬性 Keys 取得 ICollection<T>,包含 IDictionary<TKey, TValue> 的索引鍵。 (繼承自 IDictionary<Object, Object>)。
公用屬性 Values 取得 ICollection<T>,包含 IDictionary<TKey, TValue> 中的值。 (繼承自 IDictionary<Object, Object>)。

回頁首

方法

  名稱 說明
公用方法 Add(T) 將項目加入至 ICollection<T> 中。 (繼承自 ICollection<KeyValuePair<Object, Object>>)。
公用方法 Add(TKey, TValue) 將具有提供索引鍵和值的元素加入至 IDictionary<TKey, TValue>。 (繼承自 IDictionary<Object, Object>)。
公用方法 Add<T>(T) 使用索引鍵之物件的 Type,將物件加入至字典。
公用方法 Clear 將所有項目從 ICollection<T> 移除。 (繼承自 ICollection<KeyValuePair<Object, Object>>)。
公用方法 Contains 判斷 ICollection<T> 是否包含特定值。 (繼承自 ICollection<KeyValuePair<Object, Object>>)。
公用方法 ContainsKey 判斷 IDictionary<TKey, TValue> 是否包含具有指定索引鍵的元素。 (繼承自 IDictionary<Object, Object>)。
公用方法 CopyTo 從特定的 Array 索引開始,複製 ICollection<T> 項目至 Array。 (繼承自 ICollection<KeyValuePair<Object, Object>>)。
公用方法 GetEnumerator() 傳回可逐一查看集合的列舉程式。 (繼承自 IEnumerable<KeyValuePair<Object, Object>>)。
公用方法 GetEnumerator() 傳回會逐一查看集合的列舉程式。 (繼承自 IEnumerable)。
公用方法 GetValue<T>() 取得具有指定參考型別的物件。
公用方法 GetValue<T>(Object) 取得具有指定參考型別且與指定索引鍵相關聯的物件。
公用方法 Remove(TKey) 將有指定索引鍵的元素從 IDictionary<TKey, TValue> 移除。 (繼承自 IDictionary<Object, Object>)。
公用方法 Remove(T) ICollection<T> 移除特定物件之第一個符合的元素。 (繼承自 ICollection<KeyValuePair<Object, Object>>)。
公用方法 Remove<T>() 從字典中移除具有指定 Type 的物件。
公用方法 TryGetValue(TKey, TValue%) 取得與指定索引鍵關聯的值。 (繼承自 IDictionary<Object, Object>)。
公用方法 TryGetValue<T>(T%) 取得具有指定型別的物件。
公用方法 TryGetValue<T>(Object, T%) 取得具有指定型別且與指定索引鍵相關聯的物件。

回頁首

備註

您可以將自訂資料加入到實作 IAnnotatedObject 介面的 SharePoint 工具物件模型中的執行個體型別。 這些型別具有 Annotations 屬性會傳回 IAnnotationDictionary 物件。 如需詳細資訊,請參閱讓自訂資料與 SharePoint 工具擴充功能產生關聯

請參閱

參考

Microsoft.VisualStudio.SharePoint 命名空間