C# Class iServe.Models.dotNailsCommon.DotNailsModelBinder

Inheritance: Microsoft.Web.Mvc.DataAnnotations.DataAnnotationsModelBinder
ファイルを表示 Open project: fellowshiptech/ft-iserve

Protected Methods

Method Description
CreateModel ( System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ModelBindingContext bindingContext, Type modelType ) : object

For any controller implementing IDotNailsController, this will ask that controller to use its default ModelFactory to create the model entity to be passed into the controller action. This results in the proper initialization of the entity by the factory (most important of which is the setting of the DataContext). For any other controller, the default binder is used to create the entity.

GetDisplayName ( PropertyDescriptor descriptor ) : string
GetValidationAttributes ( PropertyDescriptor propertyDescriptor ) : IEnumerable
OnPropertyValidating ( System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ModelBindingContext bindingContext, PropertyDescriptor propertyDescriptor, object value ) : bool

Method Details

CreateModel() protected method

For any controller implementing IDotNailsController, this will ask that controller to use its default ModelFactory to create the model entity to be passed into the controller action. This results in the proper initialization of the entity by the factory (most important of which is the setting of the DataContext). For any other controller, the default binder is used to create the entity.
protected CreateModel ( System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ModelBindingContext bindingContext, Type modelType ) : object
controllerContext System.Web.Mvc.ControllerContext
bindingContext System.Web.Mvc.ModelBindingContext
modelType System.Type
return object

GetDisplayName() protected static method

protected static GetDisplayName ( PropertyDescriptor descriptor ) : string
descriptor System.ComponentModel.PropertyDescriptor
return string

GetValidationAttributes() protected static method

protected static GetValidationAttributes ( PropertyDescriptor propertyDescriptor ) : IEnumerable
propertyDescriptor System.ComponentModel.PropertyDescriptor
return IEnumerable

OnPropertyValidating() protected method

protected OnPropertyValidating ( System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ModelBindingContext bindingContext, PropertyDescriptor propertyDescriptor, object value ) : bool
controllerContext System.Web.Mvc.ControllerContext
bindingContext System.Web.Mvc.ModelBindingContext
propertyDescriptor System.ComponentModel.PropertyDescriptor
value object
return bool