C# Class Habanero.BO.ReflectionPropertyMapper

This is a mapper class that handles the mapping of a property name to a specific property for a specified IBusinessObject. The property name can be specified as a path through single relationships on the IBusinessObject and its' relationship tree. For Example:
For the ContactPerson BusinessObject when the propertyName is "FirstName", the returned IBOProp will be the "FirstName" property on ContactPerson.
If the propertyName was "Organisation.Name" then the Organisation relationship on the contact person will be traversed and monitored and return the corresponding "Name" IBOProp for the ContactPerson's current Organisation.
Inheritance: IBOPropertyMapper
ファイルを表示 Open project: Chillisoft/habanero Class Usage Examples

Protected Properties

Property Type Description
_invalidMessage string
_propertyInfo System.Reflection.PropertyInfo

Public Methods

Method Description
GetPropertyValue ( ) : object

Return the Property Value for the Property being mapped.

ReflectionPropertyMapper ( string propertyName ) : System

Creates a BOPropertyMapper for the specified property name/path.

SetPropertyValue ( object propValue ) : void

Sets the BOProp that this mapper is mapped to the associated propValue

Private Methods

Method Description
CheckBusinessObjectSet ( string methodName ) : void
ThrowPropertyNotFoundException ( IBusinessObject businessObject ) : void

Method Details

GetPropertyValue() public method

Return the Property Value for the Property being mapped.
public GetPropertyValue ( ) : object
return object

ReflectionPropertyMapper() public method

Creates a BOPropertyMapper for the specified property name/path.
This is thrown if is null or empty.
public ReflectionPropertyMapper ( string propertyName ) : System
propertyName string The name of the property to be mapped (this could also be in the form of a path through single relationships on the BO).
return System

SetPropertyValue() public method

Sets the BOProp that this mapper is mapped to the associated propValue
public SetPropertyValue ( object propValue ) : void
propValue object
return void

Property Details

_invalidMessage protected_oe property

The message to display when the property value is invalid.
protected string _invalidMessage
return string

_propertyInfo protected_oe property

Reflection info about the property
protected PropertyInfo,System.Reflection _propertyInfo
return System.Reflection.PropertyInfo