Struct WeakValueDictionary<TKey, TValue>.AlternateLookup<TAlternateKey>
Provides an alternate lookup that can be used to perform operations on a WeakValueDictionary<TKey, TValue> using TAlternateKey instead of TKey.
Namespace: Singulink.Collections
Assembly: Singulink.Collections.Weak.dll
Syntax
public readonly struct WeakValueDictionary<TKey, TValue>.AlternateLookup<TAlternateKey> where TAlternateKey : notnull, allows ref struct
Type Parameters
| Name | Description |
|---|---|
| TAlternateKey |
Properties
| Name | Description |
|---|---|
| Comparer | Gets the equality comparer used to compare keys in the alternate lookup. |
| Dictionary | Gets the underlying dictionary associated with this alternate lookup. |
| this[TAlternateKey] | Gets or sets the value associated with the specified alternate key. Setting a value replaces any existing value for the key. |
Methods
| Name | Description |
|---|---|
| ContainsKey(TAlternateKey) | Determines whether the dictionary contains the specified alternate key with a value that is still available. |
| ContainsKey(TAlternateKey, out TKey) | Determines whether the dictionary contains the specified alternate key with a value that is still available. |
| Remove(TAlternateKey) | Removes the entry with the specified alternate key from the dictionary. |
| Remove(TAlternateKey, out TKey, out TValue) | Removes the entry with the specified alternate key from the dictionary. |
| TryAdd(TAlternateKey, TValue) | Attempts to add the specified alternate key and value to the dictionary. |
| TryGetValue(TAlternateKey, out TKey, out TValue) | Gets the value associated with the specified alternate key. |
| TryGetValue(TAlternateKey, out TValue) | Gets the value associated with the specified alternate key. |