Method | Description | |
---|---|---|
BuildObjectValue ( object value, |
Convert the specified value to destinationType.
|
|
FindPropertyOnEntity ( |
Locate a property (will throw error if prop not available!) Cache the property info. Does not handle recursive path (Account.Address.City...) - use the higher level GetPropertyValue / SetPropertyValue for that.
|
|
FindPropertyOnEntity ( |
Locate a property (will throw error if prop not available!) Cache the property info. Does not handle recursive path (Account.Address.City...)
|
|
GetFieldValue ( object instance, String fieldName, ICacheService cache ) : object |
Convenience function to retrieve the value of a field. An exception will be thrown if it cannot be located.
|
|
GetPropertyValue ( object instance, String propertyPathString, ICacheService cacheProvider ) : object |
Retrieve a property value.
|
|
SetPropertyValue ( object instance, String propertyPathString, object value, ICacheService cacheProvider ) : void |
Set a value on the specified object. If the specified property is not found then this call will be ignored.
|
Method | Description | |
---|---|---|
ConvertType ( object value, |
Attempt to automatically convert a string to a specified type.
|
|
FindField ( |
Attempt to locate a field on the specified type. Unlike Type.GetField, this will crawl up the hierarchy to try and locate a private field on a base class, if needed. For this reason this method can be resource intensive and the result should be cached.
|
|
GetPropertyPath ( |
Retrieve property path info. Throw error if unavailable. This only examines public instance properties.
|
|
GetStaticType ( |
If t is a dynamic type, this will return the first static ancestor. If t is already a static type, this will return t.
|
public static BuildObjectValue ( object value, |
||
value | object | |
destinationType | ||
paramName | string | Name used for reporting |
return | object |
public static FindPropertyOnEntity ( |
||
entityType | ||
propertyName | String | |
cacheProvider | ICacheService | If not null, it will be used to cache the reflection info |
return |
public static FindPropertyOnEntity ( |
||
entityType | ||
propertyName | String | |
cacheProvider | ICacheService | If not null, it will be used to cache the reflection info |
ignoreCase | bool | |
return |
public static GetFieldValue ( object instance, String fieldName, ICacheService cache ) : object | ||
instance | object | |
fieldName | String | Name of the field on the instance (the field must be on the instance itself - not a subproperty) |
cache | ICacheService | |
return | object |
public static GetPropertyValue ( object instance, String propertyPathString, ICacheService cacheProvider ) : object | ||
instance | object | |
propertyPathString | String | Path to property to set, separated by periods if setting a subproperty (Account.Address.City) |
cacheProvider | ICacheService | Used to cache the propertyinfo information. May be null to skip cache. |
return | object |
public static SetPropertyValue ( object instance, String propertyPathString, object value, ICacheService cacheProvider ) : void | ||
instance | object | Instance the value will be set on |
propertyPathString | String | Path to property. Subproperties may be separated by periods (Account.Address.City). |
value | object | Value to be set |
cacheProvider | ICacheService | Used to cache the propertyinfo information. May be null to skip cache. |
return | void |