C# 클래스 Microsoft.Web.Mvc.DataAnnotations.DataAnnotationsModelBinder

An implementation of IModelBinder which is designed to be a replacement default model binder, adding the functionality of validation via the validation attributes in System.ComponentModel.DataAnnotations from .NET 4.0.
상속: System.Web.Mvc.DefaultModelBinder
파일 보기 프로젝트 열기: fellowshiptech/ft-iserve

보호된 메소드들

메소드 설명
BindProperty ( System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ModelBindingContext bindingContext, PropertyDescriptor propertyDescriptor ) : void
GetModelProperties ( System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ModelBindingContext bindingContext ) : PropertyDescriptorCollection
OnModelUpdated ( System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ModelBindingContext bindingContext ) : void
OnPropertyValidating ( System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ModelBindingContext bindingContext, PropertyDescriptor propertyDescriptor, object value ) : bool

비공개 메소드들

메소드 설명
CanUpdateReadonlyTypedReference ( Type type ) : bool
ConvertValue ( PropertyDescriptor propertyDescriptor, object value ) : object

Converts a data value. Looks for the DisplayFormatAttribute to determine if empty strings should be converted to nulls (true by default).

GetDisplayName ( ICustomTypeDescriptor descriptor ) : string

Gets the display name for a class. Looks for the DisplayNameAttribute attribute, and falls back to the class's name by default.

GetDisplayName ( PropertyDescriptor descriptor ) : string

Gets the display name for a property. Looks for the DisplayAttribute attribute, then the DisplayNameAttribute attribute, and finally falls back to the property's name by default.

GetTypeDescriptor ( object model, Type modelType ) : ICustomTypeDescriptor

Gets the model's type descriptor. In order to support the buddy class metadata model for LINQ to SQL and Entity Framework, it uses AssociatedMetadataTypeTypeDescriptionProvider.

GetValidationAttributes ( PropertyDescriptor propertyDescriptor ) : IEnumerable
ModelIsValid ( System.Web.Mvc.ModelBindingContext bindingContext ) : bool
ShouldUpdateProperty ( PropertyDescriptor property, Predicate propertyFilter ) : bool
TypeAllowsNullValue ( Type type ) : bool

메소드 상세

BindProperty() 보호된 메소드

protected BindProperty ( System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ModelBindingContext bindingContext, PropertyDescriptor propertyDescriptor ) : void
controllerContext System.Web.Mvc.ControllerContext
bindingContext System.Web.Mvc.ModelBindingContext
propertyDescriptor System.ComponentModel.PropertyDescriptor
리턴 void

GetModelProperties() 보호된 메소드

protected GetModelProperties ( System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ModelBindingContext bindingContext ) : PropertyDescriptorCollection
controllerContext System.Web.Mvc.ControllerContext
bindingContext System.Web.Mvc.ModelBindingContext
리턴 System.ComponentModel.PropertyDescriptorCollection

OnModelUpdated() 보호된 메소드

protected OnModelUpdated ( System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ModelBindingContext bindingContext ) : void
controllerContext System.Web.Mvc.ControllerContext
bindingContext System.Web.Mvc.ModelBindingContext
리턴 void

OnPropertyValidating() 보호된 메소드

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
리턴 bool