C# Class Castle.MonoRail.Framework.DataBindAttribute

Inheritance: System.Attribute, IParameterBinder
Show file Open project: nats/castle-1.0.3-mono Class Usage Examples

Public Methods

Method Description
Bind ( SmartDispatcherController controller, ParameterInfo parameterInfo ) : object

Implementation of IParameterBinder.Bind and it is used to read the data available and construct the parameter type accordingly.

CalculateParamPoints ( SmartDispatcherController controller, ParameterInfo parameterInfo ) : int

Implementation of IParameterBinder.CalculateParamPoints and it is used to give the method a weight when overloads are available.

DataBindAttribute ( string prefix ) : System

Creates a DataBindAttribute with an associated prefix. The prefix must be present in the form data and is used to avoid name clashes.

Protected Methods

Method Description
BindInstanceErrors ( SmartDispatcherController controller, IDataBinder binder, object instance ) : void

Binds the instance errors.

ConfigureValidator ( SmartDispatcherController controller, IDataBinder binder ) : void

Configures the validator.

CreateBinder ( ) : IDataBinder

Creates the binder.

PopulateValidatorErrorSummary ( SmartDispatcherController controller, IDataBinder binder, object instance ) : void

Populates the validator error summary.

Method Details

Bind() public method

Implementation of IParameterBinder.Bind and it is used to read the data available and construct the parameter type accordingly.
public Bind ( SmartDispatcherController controller, ParameterInfo parameterInfo ) : object
controller SmartDispatcherController The controller instance
parameterInfo System.Reflection.ParameterInfo The parameter info
return object

BindInstanceErrors() protected method

Binds the instance errors.
protected BindInstanceErrors ( SmartDispatcherController controller, IDataBinder binder, object instance ) : void
controller SmartDispatcherController The controller.
binder IDataBinder The binder.
instance object The instance.
return void

CalculateParamPoints() public method

Implementation of IParameterBinder.CalculateParamPoints and it is used to give the method a weight when overloads are available.
public CalculateParamPoints ( SmartDispatcherController controller, ParameterInfo parameterInfo ) : int
controller SmartDispatcherController The controller instance
parameterInfo System.Reflection.ParameterInfo The parameter info
return int

ConfigureValidator() protected method

Configures the validator.
protected ConfigureValidator ( SmartDispatcherController controller, IDataBinder binder ) : void
controller SmartDispatcherController The controller.
binder IDataBinder The binder.
return void

CreateBinder() protected method

Creates the binder.
protected CreateBinder ( ) : IDataBinder
return IDataBinder

DataBindAttribute() public method

Creates a DataBindAttribute with an associated prefix. The prefix must be present in the form data and is used to avoid name clashes.
public DataBindAttribute ( string prefix ) : System
prefix string
return System

PopulateValidatorErrorSummary() protected method

Populates the validator error summary.
protected PopulateValidatorErrorSummary ( SmartDispatcherController controller, IDataBinder binder, object instance ) : void
controller SmartDispatcherController The controller.
binder IDataBinder The binder.
instance object The instance.
return void