A dictionary that implements ISerializationCallbackReceiver for serializing key value data. More...
Public Member Functions | |
ksSerializableDictionary () | |
Constructor More... | |
ksSerializableDictionary (ICollection< KeyValuePair< Key, Value >> keyValues) | |
Constructor More... | |
void | Add (Key key, Value value) |
Adds a key/value pair to the dictionary. More... | |
bool | ContainsKey (Key key) |
Checks if a key is in the dictionary. More... | |
bool | ContainsValue (Value value) |
Checks if a value is in the dictionary. More... | |
bool | Remove (Key key) |
Removes a key from the dictionary. More... | |
bool | TryGetValue (Key key, out Value value) |
Tries to get the value for a key from the dictionary. More... | |
void | Clear () |
Clears the dictionary. See Dictionary<TKey, TValue>.Clear. More... | |
IEnumerator< KeyValuePair< Key, Value > > | GetEnumerator () |
Enumerates the key/value pairs in the dictionary. More... | |
Properties | |
ICollection< Key > | Keys [get] |
Key collection. More... | |
ICollection< Value > | Values [get] |
Value collection. More... | |
int | Count [get] |
The number of key/value pairs in the dictionary. More... | |
bool | IsReadOnly [get] |
Is the dictionary read-only? More... | |
Value | this[Key key] [get, set] |
Gets or sets the value associated with a key. More... | |
A dictionary that implements ISerializationCallbackReceiver for serializing key value data.
KS.Unity.ksSerializableDictionary< Key, Value >.ksSerializableDictionary | ( | ) |
Constructor
KS.Unity.ksSerializableDictionary< Key, Value >.ksSerializableDictionary | ( | ICollection< KeyValuePair< Key, Value >> | keyValues | ) |
Constructor
keyValues | Key value pairs to populate the dictionary with. |
void KS.Unity.ksSerializableDictionary< Key, Value >.Add | ( | Key | key, |
Value | value | ||
) |
Adds a key/value pair to the dictionary.
Throws an exception if the key is already in the dictionary. See Dictionary<TKey, TValue>.Add(TKey, TValue).
key | Key to add. |
value | Value to add. |
void KS.Unity.ksSerializableDictionary< Key, Value >.Clear | ( | ) |
Clears the dictionary. See Dictionary<TKey, TValue>.Clear.
bool KS.Unity.ksSerializableDictionary< Key, Value >.ContainsKey | ( | Key | key | ) |
Checks if a key is in the dictionary.
See Dictionary<TKey, TValue>.ContainsKey(TKey).
key | Key to check for. |
bool KS.Unity.ksSerializableDictionary< Key, Value >.ContainsValue | ( | Value | value | ) |
Checks if a value is in the dictionary.
See Dictionary<TKey, TValue>.ContainsValue(TValue).
value | Value to check for. |
IEnumerator<KeyValuePair<Key, Value> > KS.Unity.ksSerializableDictionary< Key, Value >.GetEnumerator | ( | ) |
Enumerates the key/value pairs in the dictionary.
bool KS.Unity.ksSerializableDictionary< Key, Value >.Remove | ( | Key | key | ) |
Removes a key from the dictionary.
See Dictionary<TKey, TValue>.Remove(TKey).
key | Key to remove. |
bool KS.Unity.ksSerializableDictionary< Key, Value >.TryGetValue | ( | Key | key, |
out Value | value | ||
) |
Tries to get the value for a key from the dictionary.
See Dictionary<TKey, TValue>.TryGetValue(TKey, out TValue).
key | Key to get value for. |
value | The value for the key. |
|
get |
The number of key/value pairs in the dictionary.
|
get |
Is the dictionary read-only?
|
get |
Key collection.
|
getset |
Gets or sets the value associated with a key.
key | Key |
|
get |
Value collection.