DefaultModelBinder.GetPropertyValue Method

Definition

Returns the value of a property using the specified controller context, binding context, property descriptor, and property binder.

protected virtual object GetPropertyValue (System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ModelBindingContext bindingContext, System.ComponentModel.PropertyDescriptor propertyDescriptor, System.Web.Mvc.IModelBinder propertyBinder);
abstract member GetPropertyValue : System.Web.Mvc.ControllerContext * System.Web.Mvc.ModelBindingContext * System.ComponentModel.PropertyDescriptor * System.Web.Mvc.IModelBinder -> obj
override this.GetPropertyValue : System.Web.Mvc.ControllerContext * System.Web.Mvc.ModelBindingContext * System.ComponentModel.PropertyDescriptor * System.Web.Mvc.IModelBinder -> obj
Protected Overridable Function GetPropertyValue (controllerContext As ControllerContext, bindingContext As ModelBindingContext, propertyDescriptor As PropertyDescriptor, propertyBinder As IModelBinder) As Object

Parameters

controllerContext
ControllerContext

The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data.

bindingContext
ModelBindingContext

The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider.

propertyDescriptor
PropertyDescriptor

The descriptor for the property to access. The descriptor provides information such as the component type, property type, and property value. It also provides methods to get or set the property value.

propertyBinder
IModelBinder

An object that provides a way to bind the property.

Returns

An object that represents the property value.

Applies to