Method | Description | |
---|---|---|
GetType ( |
Gets the Type of the given property of the given targetType. The targetType and propertyName parameters can't be null.
|
|
GetValue ( object target, string propertyName ) : object |
Gets the value of the given property of the given target. If objects within the property hierarchy are null references, null will be returned. The target and propertyName parameters can't be null.
|
|
SetValue ( object target, string propertyName, object value ) : void |
Method | Description | |
---|---|---|
CalculateDistance ( |
Calculates the hierarchy levels between two classes. If the targetObjectType is the same as the baseType, the returned distance will be 0. If the two types do not belong to the same hierarchy, -1 will be returned.
|
|
Construct ( |
Creates a new object of the given type, provided that the type has a default (parameterless) constructor. If it does not have such a constructor, an exception will be thrown.
|
|
GetBestMatchingProperty ( string propertyName, |
Gets the best matching property info for the given name on the given type if the same property is defined on multiple levels in the object hierarchy.
|
|
GetPropertyInfo ( |
Obtains the PropertyInfo for the given propertyName of the given type from the cache. If it is not already in the cache, the PropertyInfo will be looked up and added to the cache.
|
|
GetPropertyInfoCache ( |
Returns the PropertyInfoCache for the given type. If there isn't one available already, a new one will be created.
|
|
GetPropertyNameString ( string propertyList, int level ) : string |
Returns a string containing the properties in the propertyList up to the given level, separated by dots. For the propertyList { "Zero", "One", "Two" } and level 1, the string "Zero.One" will be returned.
|
|
GetTypeImpl ( |
Returns the type of the given property on the target instance. The type and propertyName parameters can't be null.
|
|
GetValueImpl ( object target, string propertyName ) : object |
Returns the value of the given property on the target instance. The target instance and propertyName parameters can't be null.
|
|
SetValueImpl ( object target, string propertyName, object value ) : void |
Sets the given property of the target instance to the given value. Type mismatches in the parameters of these methods will result in an exception. Also, the target instance and propertyName parameters can't be null.
|
public GetType ( |
||
targetType | the target type which contains the property | |
propertyName | string | the property to get, can be a property on a nested object (eg. "Child.Name") |
return |
public GetValue ( object target, string propertyName ) : object | ||
target | object | the target object to get the value from |
propertyName | string | the property to get, can be a property on a nested object (eg. "Child.Name") |
return | object |
public SetValue ( object target, string propertyName, object value ) : void | ||
target | object | |
propertyName | string | |
value | object | the new value of the property |
return | void |