ClassWeakReferenceDictionary<TKey, TValue>
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
WeakReferenceDictionary()
Initializes a new instance of the WeakReferenceDictionary class.
Declaration
public WeakReferenceDictionary()
Properties
Count
Gets the number of elements contained in the dictionary.
IsReadOnly
Gets a value indicating whether the dictionary is read-only.
Keys
Gets an ICollection containing the keys of the dictionary.
Declaration
public ICollection<TKey> Keys { get; }
Property Value
ICollection<TKey>
Implements
Values
Gets an ICollection containing the values in the dictionary.
Declaration
public ICollection<TValue> Values { get; }
Property Value
ICollection<TValue>
Implements
this[TKey]
Gets or sets the value associated with the specified key.
Declaration
public TValue this[TKey key] { get; set; }
Parameters
key
TKey
Property Value
TValue
Implements
Methods
Add(TKey, TValue)
Adds the specified key and value to the dictionary.
Declaration
public void Add(TKey key, TValue value)
Parameters
key
TKey
The key.
value
TValue
The value.
Implements
Clear()
Removes all keys and values from the dictionary.
Declaration
public void Clear()
Implements
Contains(KeyValuePair<TKey, TValue>)
Determines whether a sequence contains a specified element.
Declaration
public bool Contains(KeyValuePair<TKey, TValue> item)
Parameters
item
KeyValuePair<TKey, TValue>
The item.
Returns
Implements
ContainsKey(TKey)
Determines whether the dictionary contains the specified key.
Declaration
public bool ContainsKey(TKey key)
Parameters
key
TKey
The key.
Returns
Implements
CopyTo(KeyValuePair<TKey, TValue>[], int)
Copies the elements of the dictionary to an array, starting at a particular index.
Declaration
public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
Parameters
array
KeyValuePair<TKey, TValue>[]
The array.
arrayIndex
Index of the array.
Implements
GetEnumerator()
Returns an enumerator that iterates through the dictionary.
Declaration
public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
Returns
IEnumerator<KeyValuePair<TKey, TValue>>
Implements
Remove(TKey)
Removes the value with the specified key from the dictionary.
Declaration
public bool Remove(TKey key)
Parameters
key
TKey
The key.
Returns
Implements
TryGetValue(TKey, out TValue)
Gets the value associated with the specified key.
Declaration
public bool TryGetValue(TKey key, out TValue value)
Parameters
key
TKey
The key.
value
TValue
The value.
Returns
Implements