Click or drag to resize

FileBackedDictionaryTKey, TValue Class

Represents a lookup table of key/value pairs backed by a file, with very little memory overhead.
Inheritance Hierarchy
SystemObject
  GSF.CollectionsFileBackedDictionaryTKey, TValue

Namespace: GSF.Collections
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.218-beta+101eee949414e414795e55a6e73d88938f0177b8
Syntax
public sealed class FileBackedDictionary<TKey, TValue> : IDictionary<TKey, TValue>, 
	ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, 
	IEnumerable, IDisposable
View Source

Type Parameters

TKey
The type of the keys in the lookup table.
TValue
The type of the values in the lookup table.

The FileBackedDictionaryTKey, TValue type exposes the following members.

Constructors
 NameDescription
Public methodFileBackedDictionaryTKey, TValue Creates a new instance of the FileBackedDictionaryTKey, TValue class.
Public methodFileBackedDictionaryTKey, TValue(IDictionaryTKey, TValue) Creates a new instance of the FileBackedDictionaryTKey, TValue class.
Public methodFileBackedDictionaryTKey, TValue(IEqualityComparerTKey) Creates a new instance of the FileBackedDictionaryTKey, TValue class.
Public methodFileBackedDictionaryTKey, TValue(String) Creates a new instance of the FileBackedDictionaryTKey, TValue class.
Public methodFileBackedDictionaryTKey, TValue(IDictionaryTKey, TValue, IEqualityComparerTKey) Creates a new instance of the FileBackedDictionaryTKey, TValue class.
Public methodFileBackedDictionaryTKey, TValue(String, IDictionaryTKey, TValue) Creates a new instance of the FileBackedDictionaryTKey, TValue class.
Public methodFileBackedDictionaryTKey, TValue(String, IEqualityComparerTKey) Creates a new instance of the FileBackedDictionaryTKey, TValue class.
Public methodFileBackedDictionaryTKey, TValue(String, IDictionaryTKey, TValue, IEqualityComparerTKey) Creates a new instance of the FileBackedDictionaryTKey, TValue class.
Top
Properties
 NameDescription
Public propertyCacheSize Gets or sets the size of the cache used to store data from the file in memory.
Public propertyCount Gets the number of elements contained in the FileBackedDictionaryTKey, TValue.
Public propertyDefaultSignature Gets the default signature used by the FileBackedDictionaryTKey, TValue if no user-defined signature is supplied.
Public propertyFilePath Gets or sets the path to the file backing this dictionary.
Public propertyFragmentationCount Gets the number of operations that fragment the lookup table that have occurred since the last time the lookup table was compacted.
Public propertyIsReadOnly Gets a value indicating whether the FileBackedDictionaryTKey, TValue is read-only.
Public propertyItem Gets or sets the element with the specified key.
Public propertyKeys Gets an FileBackedDictionaryTKey, TValue containing the keys of the FileBackedDictionaryTKey, TValue.
Public propertySignature Gets or sets the signature of the file backing the lookup table.
Public propertyValues Gets an FileBackedDictionaryTKey, TValue containing the values in the FileBackedDictionaryTKey, TValue.
Top
Methods
 NameDescription
Public methodAdd(KeyValuePairTKey, TValue) Adds an item to the FileBackedDictionaryTKey, TValue.
Public methodAdd(TKey, TValue) Adds an element with the provided key and value to the FileBackedDictionaryTKey, TValue.
Public methodClear Removes all items from the FileBackedDictionaryTKey, TValue.
Public methodClose Closes the file backing this dictionary.
Public methodCompact Defragments the item section of the dictionary, which gets fragmented after removing keys or updating values.
Public methodContains Determines whether the FileBackedDictionaryTKey, TValue contains a specific value.
Public methodContainsKey Determines whether the FileBackedDictionaryTKey, TValue contains an element with the specified key.
Public methodCopyTo Copies the elements of the FileBackedDictionaryTKey, TValue to an Array, starting at a particular Array index.
Public methodDispose Releases all the resources used by the FileBackedDictionaryTKey, TValue object.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetEnumerator Returns an enumerator that iterates through the collection.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetKeys Gets an enumerable used to iterate only the keys in the dictionary.
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodGetValues Gets an enumerable used to iterate only the values in the dictionary.
Public methodOpen Opens the file backing this dictionary.
Public methodOpenRead Opens the file backing this hash set in read-only mode.
Public methodRemove(TKey) Removes the element with the specified key from the FileBackedDictionaryTKey, TValue.
Public methodRemove(KeyValuePairTKey, TValue) Removes the first occurrence of a specific object from the FileBackedDictionaryTKey, TValue.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodTryGetValue Gets the value associated with the specified key.
Top
Extension Methods
 NameDescription
Public Extension MethodAllParallelKeyValuePairTKey, TValue Determines whether all elements of a sequence satisfy a condition with each item being tested in parallel.
(Defined by CollectionExtensions)
Public Extension MethodDistinctByKeyValuePairTKey, TValue, TKey Returns only the elements whose keys are distinct.
(Defined by CollectionExtensions)
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodMajorityKeyValuePairTKey, TValue Returns the majority value in the collection, or default type value if no item represents the majority.
(Defined by CollectionExtensions)
Public Extension MethodMajorityKeyValuePairTKey, TValue Returns the majority value in the collection, or defaultValue if no item represents the majority.
(Defined by CollectionExtensions)
Public Extension MethodMajorityByKeyValuePairTKey, TValue, TKey Returns the majority value in the collection, or default type value if no item represents the majority.
(Defined by CollectionExtensions)
Public Extension MethodMajorityByKeyValuePairTKey, TValue, TKey Returns the majority value in the collection, or defaultValue if no item represents the majority.
(Defined by CollectionExtensions)
Public Extension MethodMaxKeyValuePairTKey, TValueReturns the largest item from the enumeration.
(Defined by CollectionExtensions)
Public Extension MethodMaxKeyValuePairTKey, TValueReturns the largest item from the enumeration.
(Defined by CollectionExtensions)
Public Extension MethodMaxByKeyValuePairTKey, TValue, TKeySelects the largest item from the enumeration.
(Defined by CollectionExtensions)
Public Extension MethodMedianKeyValuePairTKey, TValue Gets the median item(s) from an enumeration, i.e., one return item for odd lengths, two for even lengths.
(Defined by CollectionExtensions)
Public Extension MethodMiddleKeyValuePairTKey, TValue Gets the middle item(s) from an enumeration, i.e., one return item for odd lengths, two for even lengths.
(Defined by CollectionExtensions)
Public Extension MethodMinKeyValuePairTKey, TValueReturns the smallest item from the enumeration.
(Defined by CollectionExtensions)
Public Extension MethodMinKeyValuePairTKey, TValueReturns the smallest item from the enumeration.
(Defined by CollectionExtensions)
Public Extension MethodMinByKeyValuePairTKey, TValue, TKeySelects the smallest item from the enumeration.
(Defined by CollectionExtensions)
Public Extension MethodMinorityKeyValuePairTKey, TValue Returns the minority value in the collection, or default type value if no item represents the minority.
(Defined by CollectionExtensions)
Public Extension MethodMinorityKeyValuePairTKey, TValue Returns the minority value in the collection, or defaultValue if no item represents the minority.
(Defined by CollectionExtensions)
Public Extension MethodMinorityByKeyValuePairTKey, TValue, TKey Returns the minority value in the collection, or default type value if no item represents the majority.
(Defined by CollectionExtensions)
Public Extension MethodMinorityByKeyValuePairTKey, TValue, TKey Returns the minority value in the collection, or defaultValue if no item represents the majority.
(Defined by CollectionExtensions)
Public Extension MethodStandardDeviationKeyValuePairTKey, TValue Computes the standard deviation over a sequence of Double values.
(Defined by NumericalAnalysisExtensions)
Public Extension MethodStandardDeviationKeyValuePairTKey, TValue Computes the standard deviation over a sequence of Decimal values.
(Defined by NumericalAnalysisExtensions)
Public Extension MethodStandardDeviationKeyValuePairTKey, TValue Computes the standard deviation over a sequence of Single values.
(Defined by NumericalAnalysisExtensions)
Public Extension MethodToDelimitedStringKeyValuePairTKey, TValueConverts an enumeration to a string, using the default delimiter ("|") that can later be converted back to a list using LoadDelimitedString.
(Defined by CollectionExtensions)
Public Extension MethodToDelimitedStringKeyValuePairTKey, TValueConverts an enumeration to a string that can later be converted back to a list using LoadDelimitedString.
(Defined by CollectionExtensions)
Public Extension MethodToDelimitedStringKeyValuePairTKey, TValueConverts an enumeration to a string that can later be converted back to a list using LoadDelimitedString.
(Defined by CollectionExtensions)
Public Extension MethodToPagedListKeyValuePairTKey, TValue Gets a PagedListT to paginate source enumeration for a given page and specified pageSize.
(Defined by CollectionExtensions)
Top
See Also