ClassWeakReferenceDictionary<TKey, TValue>
Represents a dictionary that holds WeakReferences to its values.
Definition
Namespace:Telerik.Windows.Diagrams.Core
Assembly:Telerik.WinControls.RadDiagram.dll
Type Parameters:
TKey
TValue
Syntax:
public class WeakReferenceDictionary<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>
Values
Gets an ICollection containing the values in the dictionary.
Declaration
public ICollection<TValue> Values { get; }
Property Value
ICollection<TValue>
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
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.
Clear()
Removes all keys and values from the dictionary.
Declaration
public void Clear()
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
ContainsKey(TKey)
Determines whether the dictionary contains the specified key.
Declaration
public bool ContainsKey(TKey key)
Parameters
key
TKey
The key.
Returns
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.
GetEnumerator()
Returns an enumerator that iterates through the dictionary.
Declaration
public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
Returns
IEnumerator<KeyValuePair<TKey, TValue>>
Remove(TKey)
Removes the value with the specified key from the dictionary.
Declaration
public bool Remove(TKey key)
Parameters
key
TKey
The key.
Returns
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