C# Class iServe.Models.dotNailsCommon.DotNailsModelBinder

Inheritance: Microsoft.Web.Mvc.DataAnnotations.DataAnnotationsModelBinder
Afficher le fichier Open project: fellowshiptech/ft-iserve

Méthodes protégées

Méthode 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 méthode

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
Résultat object

GetDisplayName() protected static méthode

protected static GetDisplayName ( PropertyDescriptor descriptor ) : string
descriptor System.ComponentModel.PropertyDescriptor
Résultat string

GetValidationAttributes() protected static méthode

protected static GetValidationAttributes ( PropertyDescriptor propertyDescriptor ) : IEnumerable
propertyDescriptor System.ComponentModel.PropertyDescriptor
Résultat IEnumerable

OnPropertyValidating() protected méthode

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
Résultat bool