Udostępnij za pośrednictwem


DefaultModelBindingContext.CreateBindingContext Metoda

Definicja

Tworzy nową DefaultModelBindingContext operację powiązania modelu najwyższego poziomu.

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

Parametry

actionContext
ActionContext

Skojarzony ActionContext z operacją powiązania.

valueProvider
IValueProvider

Element IValueProvider do użycia do powiązania.

metadata
ModelMetadata

ModelMetadata skojarzony z modelem.

bindingInfo
BindingInfo

BindingInfo skojarzony z modelem.

modelName
String

Nazwa powiązanej właściwości lub parametru.

Zwraca

Nowe wystąpienie elementu DefaultModelBindingContext.

Dotyczy