Wraps an object in a dictionary interface.
More...
|
object | Unwrap () |
| Unwrap the wrapped object as a plain old object.- Returns
|
T | Unwrap< T > () |
| Unwrap the wrapped object with a hard cast to T (buyer beware!)- Template Parameters
-
- Returns
|
bool | TryUnwrap< T > (out T result) |
| Attempts to unwrap a wrapped value.- Template Parameters
-
- Returns
|
| DictionaryWrappingObject (object wrapped) |
| Provides a mechanism to reflectively read and write members on an object via an IDictionary<string, object> interface.
|
| DictionaryWrappingObject (object wrapped, StringComparer keyComparer) |
| Provides a mechanism to reflectively read and write members on an object via an IDictionary<string, object> interface with keys matched by the provided keyComparer.
|
| DictionaryWrappingObject (object wrapped, WrapOptions options) |
| Provides a mechanism to reflectively read members on an object via an IDictionary<string, object> interface where the keyComparer used is StringComparer.Ordinal.
|
| DictionaryWrappingObject (object wrapped, StringComparer keyComparer, WrapOptions options) |
| Provides a mechanism to reflectively read members on an object via an IDictionary<string, object> interface.
|
IEnumerator< KeyValuePair< string, object > > | GetEnumerator () |
void | Add (KeyValuePair< string, object > item) |
void | Clear () |
bool | Contains (KeyValuePair< string, object > item) |
void | CopyTo (KeyValuePair< string, object >[] array, int arrayIndex) |
bool | Remove (KeyValuePair< string, object > item) |
bool | ContainsKey (string key) |
void | Add (string key, object value) |
bool | Remove (string key) |
bool | TryGetValue (string key, out object value) |
|
StringComparer | Comparer [get] |
| The string comparer used to locate keys.
|
int | Count [get] |
bool | IsReadOnly [get] |
object | this[string key] [get, set] |
ICollection< string > | Keys [get] |
ICollection< object > | Values [get] |
Wraps an object in a dictionary interface.
◆ DictionaryWrappingObject() [1/4]
PeanutButter.Utils.Dictionaries.DictionaryWrappingObject.DictionaryWrappingObject |
( |
object | wrapped | ) |
|
Provides a mechanism to reflectively read and write members on an object via an IDictionary<string, object> interface.
- Parameters
-
◆ DictionaryWrappingObject() [2/4]
PeanutButter.Utils.Dictionaries.DictionaryWrappingObject.DictionaryWrappingObject |
( |
object | wrapped, |
|
|
StringComparer | keyComparer ) |
Provides a mechanism to reflectively read and write members on an object via an IDictionary<string, object> interface with keys matched by the provided keyComparer.
- Parameters
-
◆ DictionaryWrappingObject() [3/4]
PeanutButter.Utils.Dictionaries.DictionaryWrappingObject.DictionaryWrappingObject |
( |
object | wrapped, |
|
|
WrapOptions | options ) |
Provides a mechanism to reflectively read members on an object via an IDictionary<string, object> interface where the keyComparer used is StringComparer.Ordinal.
- Parameters
-
◆ DictionaryWrappingObject() [4/4]
PeanutButter.Utils.Dictionaries.DictionaryWrappingObject.DictionaryWrappingObject |
( |
object | wrapped, |
|
|
StringComparer | keyComparer, |
|
|
WrapOptions | options ) |
Provides a mechanism to reflectively read members on an object via an IDictionary<string, object> interface.
- Parameters
-
wrapped | |
keyComparer | Specify the key-comparer to use when reaching into objects
- the default is case-sensitive, ordinal, but you can make your wrapper instance more "forgiving" with a case-insensitive key-comparer
|
options | Specific options for this wrapping |
◆ TryUnwrap< T >()
bool PeanutButter.Utils.Dictionaries.DictionaryWrappingObject.TryUnwrap< T > |
( |
out T | result | ) |
|
◆ Unwrap()
object PeanutButter.Utils.Dictionaries.DictionaryWrappingObject.Unwrap |
( |
| ) |
|
◆ Unwrap< T >()
The documentation for this class was generated from the following file:
- source/Utils/PeanutButter.Utils/Dictionaries/DictionaryWrappingObject.cs