|
PeanutButter
|
Provides duck-typing extension methods around dictionary objects. More...
Static Public Member Functions | |
| static T | ForceFuzzyDuckAs< T > (this IDictionary< string, object > src) |
| Forces approximate ducking around a dictionary. Will "create" underlying "properties" as required. Will attempt to convert to and from the underlying types as required. Will match properties case-insensitive. | |
| static T | ForceFuzzyDuckAs< T > (this IDictionary< string, object > src, bool forceConcreteType) |
| Forces approximate ducking around a dictionary. Will "create" underlying "properties" as required. Will attempt to convert to and from the underlying types as required. Will match properties case-insensitive. | |
| static T | ForceFuzzyDuckAs< T > (this object src) |
| Forces approximate ducking around a dictionary. Will "create" underlying "properties" as required. Will attempt to convert to and from the underlying types as required. Will match properties case-insensitive. | |
| static T | ForceDuckAs< T > (this IDictionary< string, object > src) |
| Forces ducking around a dictionary. This will expect matching of property names (case-sensitive) and types when they are "implemented". Otherwise they will be created as required. | |
| static T | DuckAs< T > (this IDictionary< string, object > src, TransformFunc toNativeTransform, TransformFunc fromNativeTransform) |
| Performs ducking with property name redirection. | |
| static T | DuckAs< T > (this IDictionary< string, object > src, TransformFunc toNativeTransform, TransformFunc fromNativeTransform, bool throwOnError) |
| Performs ducking with property name redirection. | |
| static T | FuzzyDuckAs< T > (this IDictionary< string, object > src, TransformFunc toNativeTransform, TransformFunc fromNativeTransform) |
| Performs fuzzy ducking with property name redirection. | |
| static T | FuzzyDuckAs< T > (this IDictionary< string, object > src, TransformFunc toNativeTransform, TransformFunc fromNativeTransform, bool throwOnError) |
| Performs fuzzy ducking with property name redirection. | |
| static T | FuzzyDuckAs< T > (this IDictionary< string, object > src, string keyPrefix) |
| Fuzzy-Ducks a Dictionary (or part thereof) using a key prefix to allow "namespacing" of config. | |
| static T | FuzzyDuckAs< T > (this IDictionary< string, object > src, string keyPrefix, bool throwOnError) |
| Fuzzy-Ducks a Dictionary (or part thereof) using a key prefix to allow "namespacing" of config. | |
| static T | DuckAs< T > (this IDictionary< string, object > src, string keyPrefix) |
| Ducks a Dictionary (or part thereof) using a key prefix to allow "namespacing" of config. | |
| static T | DuckAs< T > (this IDictionary< string, object > src, string keyPrefix, bool throwOnError) |
| Ducks a Dictionary (or part thereof) using a key prefix to allow "namespacing" of config. | |
| static T | FuzzyDuckAs< T > (this NameValueCollection src, string keyPrefix) |
| Fuzzy-Ducks a NameValueCollection (or part thereof) using a key prefix to allow "namespacing" of config. | |
| static T | FuzzyDuckAs< T > (this NameValueCollection src, string keyPrefix, bool throwOnError) |
| Fuzzy-Ducks a NameValueCollection (or part thereof) using a key prefix to allow "namespacing" of config. | |
| static T | DuckAs< T > (this NameValueCollection src, string keyPrefix) |
| Ducks a NameValueCollection (or part thereof) using a key prefix to allow "namespacing" of config. | |
| static T | DuckAs< T > (this NameValueCollection src, string keyPrefix, bool throwOnError) |
| Ducks a NameValueCollection (or part thereof) using a key prefix to allow "namespacing" of config. | |
Provides duck-typing extension methods around dictionary objects.
|
static |
Ducks a Dictionary (or part thereof) using a key prefix to allow "namespacing" of config.
| src | IDictionary to operate on |
| keyPrefix | key prefix to take into account |
| T | Interface to duck onto |
| T | : | class |
|
static |
Ducks a Dictionary (or part thereof) using a key prefix to allow "namespacing" of config.
| src | IDictionary to operate on |
| keyPrefix | key prefix to take into account |
| throwOnError | flag: when unduckable, throw instead of just returning null |
| T | Interface to duck onto |
| T | : | class |
|
static |
Performs ducking with property name redirection.
| src | Dictionary to duck |
| toNativeTransform | Func to transform from keys corresponding to T's interface properties to keys that are found in src |
| fromNativeTransform | Reverse of toNativeTransform |
| T | Interface to duck this dictionary as |
| T | : | class |
|
static |
Performs ducking with property name redirection.
| src | Dictionary to duck |
| toNativeTransform | Func to transform from keys corresponding to T's interface properties to keys that are found in src |
| fromNativeTransform | Reverse of toNativeTransform |
| throwOnError | Flag to throw exception on error instead of just silent failure |
| T | Interface to duck this dictionary as |
| T | : | class |
|
static |
Ducks a NameValueCollection (or part thereof) using a key prefix to allow "namespacing" of config.
| src | NameValueCollection to operate on |
| keyPrefix | key prefix to take into account |
| T | Interface to duck onto |
| T | : | class |
|
static |
Ducks a NameValueCollection (or part thereof) using a key prefix to allow "namespacing" of config.
| src | NameValueCollection to operate on |
| keyPrefix | key prefix to take into account |
| throwOnError | flag: when unduckable, throw instead of just returning null |
| T | Interface to duck onto |
| T | : | class |
|
static |
Forces ducking around a dictionary. This will expect matching of property names (case-sensitive) and types when they are "implemented". Otherwise they will be created as required.
| src |
| T |
|
static |
Forces approximate ducking around a dictionary. Will "create" underlying "properties" as required. Will attempt to convert to and from the underlying types as required. Will match properties case-insensitive.
| src |
| T |
|
static |
Forces approximate ducking around a dictionary. Will "create" underlying "properties" as required. Will attempt to convert to and from the underlying types as required. Will match properties case-insensitive.
| src | |
| forceConcreteType | force ducking when T is concrete without virtual/abstract members |
| T |
|
static |
Forces approximate ducking around a dictionary. Will "create" underlying "properties" as required. Will attempt to convert to and from the underlying types as required. Will match properties case-insensitive.
| src |
| T |
|
static |
Fuzzy-Ducks a Dictionary (or part thereof) using a key prefix to allow "namespacing" of config.
| src | IDictionary to operate on |
| keyPrefix | key prefix to take into account |
| T | Interface to duck onto |
| T | : | class |
|
static |
Fuzzy-Ducks a Dictionary (or part thereof) using a key prefix to allow "namespacing" of config.
| src | IDictionary to operate on |
| keyPrefix | key prefix to take into account |
| throwOnError | flag: when unduckable, throw instead of just returning null |
| T | Interface to duck onto |
| T | : | class |
|
static |
Performs fuzzy ducking with property name redirection.
| src | Dictionary to duck |
| toNativeTransform | Func to transform from keys corresponding to T's interface properties to keys that are found in src |
| fromNativeTransform | Reverse of toNativeTransform |
| T | Interface to duck this dictionary as |
| T | : | class |
|
static |
Performs fuzzy ducking with property name redirection.
| src | Dictionary to duck |
| toNativeTransform | Func to transform from keys corresponding to T's interface properties to keys that are found in src |
| fromNativeTransform | Reverse of toNativeTransform |
| throwOnError | Flag to throw exception on error instead of just silent failure |
| T | Interface to duck this dictionary as |
| T | : | class |
|
static |
Fuzzy-Ducks a NameValueCollection (or part thereof) using a key prefix to allow "namespacing" of config.
| src | NameValueCollection to operate on |
| keyPrefix | key prefix to take into account |
| T | Interface to duck onto |
| T | : | class |
|
static |
Fuzzy-Ducks a NameValueCollection (or part thereof) using a key prefix to allow "namespacing" of config.
| src | NameValueCollection to operate on |
| keyPrefix | key prefix to take into account |
| throwOnError | flag: when unduckable, throw instead of just returning null |
| T | Interface to duck onto |
| T | : | class |