ModelBinderProviderCollection.GetBinder 方法

定义

返回指定执行上下文和绑定上下文的适当的模型联编程序。

public:
 System::Web::ModelBinding::IModelBinder ^ GetBinder(System::Web::ModelBinding::ModelBindingExecutionContext ^ modelBindingExecutionContext, System::Web::ModelBinding::ModelBindingContext ^ bindingContext);
public System.Web.ModelBinding.IModelBinder GetBinder (System.Web.ModelBinding.ModelBindingExecutionContext modelBindingExecutionContext, System.Web.ModelBinding.ModelBindingContext bindingContext);
member this.GetBinder : System.Web.ModelBinding.ModelBindingExecutionContext * System.Web.ModelBinding.ModelBindingContext -> System.Web.ModelBinding.IModelBinder
Public Function GetBinder (modelBindingExecutionContext As ModelBindingExecutionContext, bindingContext As ModelBindingContext) As IModelBinder

参数

modelBindingExecutionContext
ModelBindingExecutionContext

该执行上下文。

bindingContext
ModelBindingContext

绑定上下文。

返回

模型联编程序。

例外

modelBindingExecutionContextbindingContextnull

此指定的模型类型没有模型联编程序或模型联编程序提供程序存在。

适用于