Class TwoLevelDictionary<PrimaryKeyType, SecondaryKeyType, ValueType>
Dictionary with two levels of hierarchy
public class TwoLevelDictionary<PrimaryKeyType, SecondaryKeyType, ValueType>
Type Parameters
PrimaryKeyTypeSecondaryKeyTypeValueType
- Inheritance
-
objectTwoLevelDictionary<PrimaryKeyType, SecondaryKeyType, ValueType>
- Extension Methods
Constructors
TwoLevelDictionary()
Constructor
public TwoLevelDictionary()
TwoLevelDictionary(bool)
Constructor
public TwoLevelDictionary(bool caseSensitive)
Parameters
caseSensitiveboolIf true, the dictionary is case sensitive
Properties
CaseInsensitive
If true, the dictionary handles string keys as case insensitive
public bool CaseInsensitive { get; protected set; }
Property Value
- bool
Dictionary
Inner dictionary of dictionaries
protected SafeDictionary<PrimaryKeyType, SafeDictionary<SecondaryKeyType, ValueType>> Dictionary { get; }
Property Value
- SafeDictionary<PrimaryKeyType, SafeDictionary<SecondaryKeyType, ValueType>>
this[PrimaryKeyType]
Gets the second level of dictionary based on the given key
public SafeDictionary<SecondaryKeyType, ValueType> this[PrimaryKeyType primaryKey] { get; set; }
Parameters
primaryKeyPrimaryKeyTypePrimary key
Property Value
- SafeDictionary<SecondaryKeyType, ValueType>
this[PrimaryKeyType, SecondaryKeyType]
Gets or sets the dictionary value
public ValueType this[PrimaryKeyType primaryKey, SecondaryKeyType secondaryKey] { get; set; }
Parameters
primaryKeyPrimaryKeyTypePrimary key
secondaryKeySecondaryKeyTypeSecondary key
Property Value
- ValueType
Methods
Clear()
Clears the dictionary
public void Clear()