Represents a dictionary that holds WeakReferences to its values.
Definition
Namespace:Telerik.Windows.Diagrams.Core
Assembly:Telerik.Windows.Diagrams.Core.dll
Type Parameters:
TKey
TValue
Syntax:
public class WeakReferenceDictionary<TKey, TValue> : IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable
Inheritance: objectWeakReferenceDictionary<TKey, TValue>
Implements:
Constructors
Initializes a new instance of the WeakReferenceDictionary class.
public WeakReferenceDictionary()
Properties
Gets the number of elements contained in the dictionary.
public int Count { get; }
Implements:
Gets a value indicating whether the dictionary is read-only.
public bool IsReadOnly { get; }
Implements:
Keys
ICollection<TKey>
Gets an ICollection containing the keys of the dictionary.
public ICollection<TKey> Keys { get; }
Implements:
this[TKey]
TValue
Gets or sets the value associated with the specified key.
public TValue this[TKey key] { get; set; }
Implements:
Values
ICollection<TValue>
Gets an ICollection containing the values in the dictionary.
public ICollection<TValue> Values { get; }
Implements:
Methods
Adds the specified key and value to the dictionary.
public void Add(TKey key, TValue value)
The key.
valueTValueThe value.
Implements:
Removes all keys and values from the dictionary.
public void Clear()
Implements:
Determines whether a sequence contains a specified element.
public bool Contains(KeyValuePair<TKey, TValue> item)
The item.
Returns:Implements:
Determines whether the dictionary contains the specified key.
Copies the elements of the dictionary to an array, starting at a particular index.
public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
The array.
arrayIndexintIndex of the array.
Implements:
Returns an enumerator that iterates through the dictionary.
public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
IEnumerator<KeyValuePair<TKey, TValue>>
Implements:
Removes the value with the specified key from the dictionary.
Gets the value associated with the specified key.
public bool TryGetValue(TKey key, out TValue value)
The key.
valueTValueThe value.
Returns:Implements: