2using System.Collections.Generic;
3using System.Runtime.Serialization;
10 [DataContract(Name =
"HashMap", Namespace = Constants.DataContractNamespace)]
16 [DataMember(Order = 1, Name =
"Map")]
33 Dictionary =
new Dictionary<TKey, TValue>(capacity);
79 Dictionary =
new Dictionary<TKey, TValue>(array.Length);
81 foreach (var pair
in array)
The base class for dictionaries with custom data contract serialization.
Dictionary< TKey, TValue > Dictionary
The underlying dictionary.
A dictionary that is data contract serializable.
HashMap(HashMap< TKey, TValue > dict)
Initializes a copy of the specified dictionary.
void SetDictionary(KeyValue< TKey, TValue >[] array)
Sets the dictionary from an array of key value pairs.
HashMap(int capacity)
Initializes a new dictionary with the specified capacity.
KeyValue< TKey, TValue >[] KeyValueArray
An array of key value pairs.
HashMap()
Initializes a new empty dictionary.
KeyValue< TKey, TValue >[] GetKeyValueArray()
Returns a new array of key value pairs for the dictionary.
A serializable key value pair.