FileBackedDictionaryTKey, TValue(String, IDictionaryTKey, TValue) Constructor
Namespace: Gemstone.IO.CollectionsAssembly: Gemstone.IO (in Gemstone.IO.dll) Version: 1.0.137 -- Release Build+b90947bdc517a875647d9003b61f08e3db816b33
public:
FileBackedDictionary(
String^ filePath,
IDictionary<TKey, TValue>^ dictionary
)
Gemstone.IO.Collections.FileBackedDictionary = function(filePath, dictionary);
Parameters
- filePath String
- The path to the file used to store the lookup table.
- dictionary IDictionaryTKey, TValue
- The dictionary whose elements are copied to this dictionary.
This constructor uses the default equality comparer for file backed lookup tables,
which is not the same as the default equality comparer for
TKey
objects. This is because the default implementation of
GetHashCode
does not provide guarantees about consistency across platforms, or even implementations
of the CLR. Instead, the default equality comparer uses a byte-for-byte comparison to
determine equality between keys and a CRC-32 for its hash code implementation. This
means the performance of the hashing function is dependent on the performance of the
serialization function.