Show / Hide Table of Contents

Class HugeDictionary<TKey, TValue>

A dictionary working around the pre .NET 4.5 memory limitations for one object.

Inheritance
System.Object
HugeDictionary<TKey, TValue>
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public class HugeDictionary<TKey, TValue> : IDictionary<TKey, TValue>
Type Parameters
TKey

TValue

Constructors

HugeDictionary()

Creates a new huge dictionary.

Declaration
public HugeDictionary()

HugeDictionary(Int32)

Creates a new huge dictionary.

Declaration
public HugeDictionary(int maxDictionarySize)
Parameters
System.Int32 maxDictionarySize

Properties

Count

Returns the total element count in this dictionary.

Declaration
public int Count { get; }
Property Value
System.Int32

CountDictionaries

Returns the count of the internal dictionaries.

Declaration
public int CountDictionaries { get; }
Property Value
System.Int32

IsReadOnly

Returns false.

Declaration
public bool IsReadOnly { get; }
Property Value
System.Boolean

Item[TKey]

Gets/sets the value corresponding to the given key.

Declaration
public TValue this[TKey key] { get; set; }
Parameters
TKey key

Property Value
TValue

Keys

Returns the collection of all the keys.

Declaration
public ICollection<TKey> Keys { get; }
Property Value
ICollection<TKey>

Values

Returns a collection of all values.

Declaration
public ICollection<TValue> Values { get; }
Property Value
ICollection<TValue>

Methods

Add(TKey, TValue)

Adds a new element.

Declaration
public void Add(TKey key, TValue value)
Parameters
TKey key

TValue value

Add(KeyValuePair<TKey, TValue>)

Adds the given item.

Declaration
public void Add(KeyValuePair<TKey, TValue> item)
Parameters
KeyValuePair<TKey, TValue> item

Clear()

Clears the entire dictionary.

Declaration
public void Clear()

Contains(KeyValuePair<TKey, TValue>)

Returns true if the given item is contained in this dictionairy.

Declaration
public bool Contains(KeyValuePair<TKey, TValue> item)
Parameters
KeyValuePair<TKey, TValue> item

Returns
System.Boolean

ContainsKey(TKey)

Returns true if contains the given key.

Declaration
public bool ContainsKey(TKey key)
Parameters
TKey key

Returns
System.Boolean

CopyTo(KeyValuePair<TKey, TValue>[], Int32)

Copies the content of an array to this dictionary.

Declaration
public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
Parameters
KeyValuePair<TKey, TValue>[] array

System.Int32 arrayIndex

GetEnumerator()

Enumerates all key-value pairs.

Declaration
public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
Returns
IEnumerator<KeyValuePair<TKey, TValue>>

Remove(TKey)

Removes an item from this dictionary.

Declaration
public bool Remove(TKey key)
Parameters
TKey key

Returns
System.Boolean

Remove(KeyValuePair<TKey, TValue>)

Removes the given item.

Declaration
public bool Remove(KeyValuePair<TKey, TValue> item)
Parameters
KeyValuePair<TKey, TValue> item

Returns
System.Boolean

TryGetValue(TKey, out TValue)

Tries getting a value.

Declaration
public bool TryGetValue(TKey key, out TValue value)
Parameters
TKey key

TValue value

Returns
System.Boolean

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Enumerates all key-value pairs.

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
System.Collections.IEnumerator

Back to top Built by Itinero, MIT licensed.