Partager via


IAnnotationDictionary Interface

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Represents a dictionary of custom data objects that you can associate with certain objects in the SharePoint tools object model.

Namespace:  Microsoft.VisualStudio.SharePoint
Assembly:  Microsoft.VisualStudio.SharePoint (in Microsoft.VisualStudio.SharePoint.dll)

Syntax

'Declaration
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

The IAnnotationDictionary type exposes the following members.

Properties

  Name Description
Public property Count Gets the number of elements contained in the ICollection<T>. (Inherited from ICollection<KeyValuePair<Object, Object>>.)
Public property IsReadOnly Gets a value indicating whether the ICollection<T> is read-only. (Inherited from ICollection<KeyValuePair<Object, Object>>.)
Public property Item Gets or sets the element with the specified key. (Inherited from IDictionary<Object, Object>.)
Public property Keys Gets an ICollection<T> containing the keys of the IDictionary<TKey, TValue>. (Inherited from IDictionary<Object, Object>.)
Public property Values Gets an ICollection<T> containing the values in the IDictionary<TKey, TValue>. (Inherited from IDictionary<Object, Object>.)

Top

Methods

  Name Description
Public method Add(T) Adds an item to the ICollection<T>. (Inherited from ICollection<KeyValuePair<Object, Object>>.)
Public method Add(TKey, TValue) Adds an element with the provided key and value to the IDictionary<TKey, TValue>. (Inherited from IDictionary<Object, Object>.)
Public method Add<T>(T) Adds an object to the dictionary by using the Type of the object for the key.
Public method Clear Removes all items from the ICollection<T>. (Inherited from ICollection<KeyValuePair<Object, Object>>.)
Public method Contains Determines whether the ICollection<T> contains a specific value. (Inherited from ICollection<KeyValuePair<Object, Object>>.)
Public method ContainsKey Determines whether the IDictionary<TKey, TValue> contains an element with the specified key. (Inherited from IDictionary<Object, Object>.)
Public method CopyTo Copies the elements of the ICollection<T> to an Array, starting at a particular Array index. (Inherited from ICollection<KeyValuePair<Object, Object>>.)
Public method GetEnumerator Returns an enumerator that iterates through the collection. (Inherited from IEnumerable<KeyValuePair<Object, Object>>.)
Public method GetValue<T>() Gets the object that has the specified reference type.
Public method GetValue<T>(Object) Gets the object that has the specified reference type and is associated with the specified key.
Public method Remove(TKey) Removes the element with the specified key from the IDictionary<TKey, TValue>. (Inherited from IDictionary<Object, Object>.)
Public method Remove(T) Removes the first occurrence of a specific object from the ICollection<T>. (Inherited from ICollection<KeyValuePair<Object, Object>>.)
Public method Remove<T>() Removes an object with the specified Type from the dictionary.
Public method TryGetValue(TKey, TValue%) Gets the value associated with the specified key. (Inherited from IDictionary<Object, Object>.)
Public method TryGetValue<T>(T%) Gets the object that has the specified type.
Public method TryGetValue<T>(Object, T%) Gets the object that has the specified type and is associated with the specified key.

Top

Remarks

You can add custom data to instances of types in the SharePoint tools object model that implement the IAnnotatedObject interface. These types have an Annotations property that returns an IAnnotationDictionary object. For more information, see Associating Custom Data with SharePoint Tools Extensions.

See Also

Reference

Microsoft.VisualStudio.SharePoint Namespace