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
Initializes a new instance of the WeakReferenceDictionary class.
public WeakReferenceDictionary()
Properties
Gets a value indicating whether the dictionary is read-only.
public bool IsReadOnly { get; }
Keys
ICollection<TKey>
Gets an ICollection containing the keys of the dictionary.
public ICollection<TKey> Keys { get; }
this[TKey]
TValue
Gets or sets the value associated with the specified key.
public TValue this[TKey key] { get; set; }
Values
ICollection<TValue>
Gets an ICollection containing the values in the dictionary.
public ICollection<TValue> Values { get; }
Methods
Adds the specified key and value to the dictionary.
public void Add(TKey key, TValue value)
The key.
valueTValueThe value.
Removes all keys and values from the dictionary.
public void Clear()
Determines whether a sequence contains a specified element.
public bool Contains(KeyValuePair<TKey, TValue> item)
The item.
Returns: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.
Returns an enumerator that iterates through the dictionary.
public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
IEnumerator<KeyValuePair<TKey, TValue>>
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: