Provides a wrapping read-write layer around another dictionary effectively allowing transparent rename of the keys.
More...
|
| RedirectingDictionary (IDictionary< string, TValue > data, TransformFunc toNativeTransform, TransformFunc fromNativeTransform) |
| Constructs a new RedirectingDictionary.
|
IEnumerator< KeyValuePair< string, TValue > > | GetEnumerator () |
void | Add (KeyValuePair< string, TValue > item) |
void | Clear () |
bool | Contains (KeyValuePair< string, TValue > item) |
void | CopyTo (KeyValuePair< string, TValue >[] array, int arrayIndex) |
bool | Remove (KeyValuePair< string, TValue > item) |
bool | ContainsKey (string key) |
void | Add (string key, TValue value) |
bool | Remove (string key) |
bool | TryGetValue (string key, out TValue value) |
|
int | Count [get] |
bool | IsReadOnly [get] |
TValue | this[string key] [get, set] |
ICollection< string > | Keys [get] |
ICollection< TValue > | Values [get] |
Provides a wrapping read-write layer around another dictionary effectively allowing transparent rename of the keys.
- Template Parameters
-
TValue | Type of values stored |
◆ RedirectingDictionary()
PeanutButter.Utils.Dictionaries.RedirectingDictionary< TValue >.RedirectingDictionary |
( |
IDictionary< string, TValue > | data, |
|
|
TransformFunc | toNativeTransform, |
|
|
TransformFunc | fromNativeTransform ) |
Constructs a new RedirectingDictionary.
- Parameters
-
data | Data to wrap |
toNativeTransform | Function to transform keys from those used against this object to native ones in the data parameter |
fromNativeTransform | Function to transform keys from those in the data object (native) to those presented by this object |
- Exceptions
-
ArgumentNullException | Thrown if null data or key transform are supplied |
The documentation for this class was generated from the following file:
- source/Utils/PeanutButter.Utils/Dictionaries/RedirectingDictionary.cs