DefaultModelBindingContext.CreateBindingContext 方法

定义

为顶级模型绑定操作创建新的 DefaultModelBindingContext

public:
 static Microsoft::AspNetCore::Mvc::ModelBinding::ModelBindingContext ^ CreateBindingContext(Microsoft::AspNetCore::Mvc::ActionContext ^ actionContext, Microsoft::AspNetCore::Mvc::ModelBinding::IValueProvider ^ valueProvider, Microsoft::AspNetCore::Mvc::ModelBinding::ModelMetadata ^ metadata, Microsoft::AspNetCore::Mvc::ModelBinding::BindingInfo ^ bindingInfo, System::String ^ modelName);
public static Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext CreateBindingContext (Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo bindingInfo, string modelName);
public static Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext CreateBindingContext (Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo? bindingInfo, string modelName);
static member CreateBindingContext : Microsoft.AspNetCore.Mvc.ActionContext * Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider * Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata * Microsoft.AspNetCore.Mvc.ModelBinding.BindingInfo * string -> Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext
Public Shared Function CreateBindingContext (actionContext As ActionContext, valueProvider As IValueProvider, metadata As ModelMetadata, bindingInfo As BindingInfo, modelName As String) As ModelBindingContext

参数

actionContext
ActionContext

ActionContext 绑定操作关联的 。

valueProvider
IValueProvider

IValueProvider要用于绑定的 。

metadata
ModelMetadata

ModelMetadata 与模型关联。

bindingInfo
BindingInfo

BindingInfo 与模型关联。

modelName
String

要绑定的属性或参数的名称。

返回

DefaultModelBindingContext 的新实例。

适用于