C# Class Castle.Monorail.JSONSupport.JSONBinderAttribute

Inheritance: System.Attribute, IParameterBinder
ファイルを表示 Open project: nats/castle-1.0.3-mono

Public Methods

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

Binds the specified parameter for the action.

Bind ( string entryValue, Type parameterType ) : object

Binds the specified entry value to a instance of a given Type(parameterType).

CalculateParamPoints ( SmartDispatcherController controller, ParameterInfo parameterInfo ) : int

Calculates the param points. Implementors should return value equals or greater than zero indicating whether the parameter can be bound successfully. The greater the value (points) the more successful the implementation indicates to the framework

JSONBinderAttribute ( string entryKey ) : System

Initializes a new instance of the JSONBinderAttribute class. For use with Castle.MonoRail.Framework.Helpers.AjaxHelper.GenerateJSProxy(string), make sure you are using Prototype 1.5.1 or later.

Method Details

Bind() public method

Binds the specified parameter for the action.
public Bind ( SmartDispatcherController controller, ParameterInfo parameterInfo ) : object
controller SmartDispatcherController The controller.
parameterInfo System.Reflection.ParameterInfo The parameter info.
return object

Bind() public static method

Binds the specified entry value to a instance of a given Type(parameterType).
public static Bind ( string entryValue, Type parameterType ) : object
entryValue string The entry value containing the JSON formatted content.
parameterType System.Type Type of the binded object.
return object

CalculateParamPoints() public method

Calculates the param points. Implementors should return value equals or greater than zero indicating whether the parameter can be bound successfully. The greater the value (points) the more successful the implementation indicates to the framework
public CalculateParamPoints ( SmartDispatcherController controller, ParameterInfo parameterInfo ) : int
controller SmartDispatcherController The controller.
parameterInfo System.Reflection.ParameterInfo The parameter info.
return int

JSONBinderAttribute() public method

Initializes a new instance of the JSONBinderAttribute class. For use with Castle.MonoRail.Framework.Helpers.AjaxHelper.GenerateJSProxy(string), make sure you are using Prototype 1.5.1 or later.
public JSONBinderAttribute ( string entryKey ) : System
entryKey string The entry key, which is the form or /// querystring key that identifies the JSON persisted content
return System