|
PeanutButter
|
Provides a wrapping read-write layer around another dictionary effectively allowing transparent rename of the keys. More...
Public Member Functions | |
| 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) |
Properties | |
| 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.
| TValue | Type of values stored |
| PeanutButter.Utils.Dictionaries.RedirectingDictionary< TValue >.RedirectingDictionary | ( | IDictionary< string, TValue > | data, |
| TransformFunc | toNativeTransform, | ||
| TransformFunc | fromNativeTransform | ||
| ) |
Constructs a new RedirectingDictionary.
| 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 |
| ArgumentNullException | Thrown if null data or key transform are supplied |