DataBindAttribute API Document
The DataBind Attribute is used to indicate that an Action methods parameter is to be intercepted and handled by the Castle.Components.Binder.DataBinder.
Allowed usage is one per method parameter, and is not inherited.
Constructors
DataBindAttribute(String prefix)
Creates a Castle.MonoRail.Framework.DataBindAttribute with an associated prefix. The prefix must be present in the form data and is used to avoid name clashes.
| Parameter | Description |
|---|---|
| prefix |
Properties
| Name | Type | Description |
|---|---|---|
| Exclude | String | Gets or sets the property names to exclude. |
| Allow | String | Gets or sets the property names to allow. |
| From | ParamStore | Gets or sets Castle.MonoRail.Framework.ParamStore used to indicate where to get the values from |
| Prefix | String | Gets the databinding prefix. |
Methods
Bind(SmartDispatcherController controller, ParameterInfo parameterInfo) : Object
Implementation of Castle.MonoRail.Framework.IParameterBinder.Bind(Castle.MonoRail.Framework.SmartDispatcherController,System.Reflection.ParameterInfo) and it is used to read the data available and construct the parameter type accordingly.
| Parameter | Description |
|---|---|
| controller | The controller instance |
| parameterInfo | The parameter info |
CalculateParamPoints(SmartDispatcherController controller, ParameterInfo parameterInfo) : Int32
Implementation of Castle.MonoRail.Framework.IParameterBinder.CalculateParamPoints(Castle.MonoRail.Framework.SmartDispatcherController,System.Reflection.ParameterInfo) and it is used to give the method a weight when overloads are available.
| Parameter | Description |
|---|---|
| controller | The controller instance |
| parameterInfo | The parameter info |