PersistentDictionaryTKey, TValue Class |
Namespace: AGI.Foundation.Infrastructure.Threading
public abstract class PersistentDictionary<TKey, TValue> : PersistentDictionaryNode<TKey, TValue>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable
The PersistentDictionaryTKey, TValue type exposes the following members.
Name | Description | |
---|---|---|
PersistentDictionaryTKey, TValue | Initializes a new instance of the PersistentDictionaryTKey, TValue class |
Name | Description | |
---|---|---|
Count |
Gets the number of elements in this dictionary.
| |
Item |
Gets the value corresponding to the specified key. Throws KeyNotFoundException
if the key does not exist in the dictionary.
| |
Keys |
Gets a read-only collection of keys in the dictionary.
| |
Values |
Gets a read-only collection of values in the dictionary.
|
Name | Description | |
---|---|---|
Add(TKey, TValue) |
Adds a specified key/value pair to the dictionary. If a value with the specified
key already exists, it is replaced. This method does not modify the dictionary on
which it is called but instead returns a new dictionary containing the added element.
| |
Add(TKey, TValue, PersistentDictionaryAddResult) |
Adds a specified key/value pair to the dictionary, and returns a value indicating
whether the key was newly added to the dictionary or it already existed and the value
was replaced. This method does not modify the dictionary on
which it is called but instead returns a new dictionary containing the added element.
| |
ContainsKey |
Determines if a specified key exists in the dictionary.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetEnumerator |
Gets an enumerator for enumerating over the key/value pairs in the dictionary.
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Remove |
Removes an item with the specified key from the dictionary. This method does not modify
the instance on which it is called but instead returns a new instance with the element removed.
If the key does not exist in the dictionary, this method returns the instance on which it is called.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
TryGetValue |
Gets the value in the dictionary corresponding to the given key.
|