ParameterBinder.BindModelAsync Metoda
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Przeciążenia
BindModelAsync(ActionContext, IValueProvider, ParameterDescriptor) |
Przestarzałe.
To przeciążenie metody jest przestarzałe i zostanie usunięte w przyszłej wersji. Zalecaną alternatywą jest BindModelAsync(ActionContext, IModelBinder, IValueProvider, ParameterDescriptor, ModelMetadata, Object). Inicjuje i wiąże model określony przez |
BindModelAsync(ActionContext, IValueProvider, ParameterDescriptor, Object) |
Przestarzałe.
To przeciążenie metody jest przestarzałe i zostanie usunięte w przyszłej wersji. Zalecaną alternatywą jest BindModelAsync(ActionContext, IModelBinder, IValueProvider, ParameterDescriptor, ModelMetadata, Object).
Tworzy powiązanie modelu określonego przy użyciu |
BindModelAsync(ActionContext, IModelBinder, IValueProvider, ParameterDescriptor, ModelMetadata, Object) |
Tworzy powiązanie modelu określonego przy użyciu |
BindModelAsync(ActionContext, IModelBinder, IValueProvider, ParameterDescriptor, ModelMetadata, Object, Object) |
Tworzy powiązanie modelu określonego przy użyciu |
BindModelAsync(ActionContext, IValueProvider, ParameterDescriptor)
- Źródło:
- ParameterBinder.cs
- Źródło:
- ParameterBinder.cs
Przestroga
This method overload is obsolete and will be removed in a future version. The recommended alternative is the overload that also takes IModelBinder, ModelMetadata and Object parameters.
To przeciążenie metody jest przestarzałe i zostanie usunięte w przyszłej wersji. Zalecaną alternatywą jest BindModelAsync(ActionContext, IModelBinder, IValueProvider, ParameterDescriptor, ModelMetadata, Object).
Inicjuje i wiąże model określony przez parameter
element .
public:
System::Threading::Tasks::Task<Microsoft::AspNetCore::Mvc::ModelBinding::ModelBindingResult> ^ BindModelAsync(Microsoft::AspNetCore::Mvc::ActionContext ^ actionContext, Microsoft::AspNetCore::Mvc::ModelBinding::IValueProvider ^ valueProvider, Microsoft::AspNetCore::Mvc::Abstractions::ParameterDescriptor ^ parameter);
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult> BindModelAsync (Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider, Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor parameter);
[System.Obsolete("This method overload is obsolete and will be removed in a future version. The recommended alternative is the overload that also takes IModelBinder, ModelMetadata and Object parameters.")]
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult> BindModelAsync (Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider, Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor parameter);
member this.BindModelAsync : Microsoft.AspNetCore.Mvc.ActionContext * Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider * Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult>
[<System.Obsolete("This method overload is obsolete and will be removed in a future version. The recommended alternative is the overload that also takes IModelBinder, ModelMetadata and Object parameters.")>]
member this.BindModelAsync : Microsoft.AspNetCore.Mvc.ActionContext * Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider * Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult>
Public Function BindModelAsync (actionContext As ActionContext, valueProvider As IValueProvider, parameter As ParameterDescriptor) As Task(Of ModelBindingResult)
Parametry
- actionContext
- ActionContext
Element ActionContext.
- valueProvider
- IValueProvider
Element IValueProvider.
- parameter
- ParameterDescriptor
Element ParameterDescriptor.
Zwraca
Wynik powiązania modelu.
- Atrybuty
Dotyczy
BindModelAsync(ActionContext, IValueProvider, ParameterDescriptor, Object)
- Źródło:
- ParameterBinder.cs
- Źródło:
- ParameterBinder.cs
Przestroga
This method overload is obsolete and will be removed in a future version. The recommended alternative is the overload that also takes IModelBinder and ModelMetadata parameters.
To przeciążenie metody jest przestarzałe i zostanie usunięte w przyszłej wersji. Zalecaną alternatywą jest BindModelAsync(ActionContext, IModelBinder, IValueProvider, ParameterDescriptor, ModelMetadata, Object).
Tworzy powiązanie modelu określonego przy użyciu parameter
jako value
wartości początkowej.
public:
virtual System::Threading::Tasks::Task<Microsoft::AspNetCore::Mvc::ModelBinding::ModelBindingResult> ^ BindModelAsync(Microsoft::AspNetCore::Mvc::ActionContext ^ actionContext, Microsoft::AspNetCore::Mvc::ModelBinding::IValueProvider ^ valueProvider, Microsoft::AspNetCore::Mvc::Abstractions::ParameterDescriptor ^ parameter, System::Object ^ value);
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult> BindModelAsync (Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider, Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor parameter, object value);
[System.Obsolete("This method overload is obsolete and will be removed in a future version. The recommended alternative is the overload that also takes IModelBinder and ModelMetadata parameters.")]
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult> BindModelAsync (Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider, Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor parameter, object value);
abstract member BindModelAsync : Microsoft.AspNetCore.Mvc.ActionContext * Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider * Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor * obj -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult>
override this.BindModelAsync : Microsoft.AspNetCore.Mvc.ActionContext * Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider * Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor * obj -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult>
[<System.Obsolete("This method overload is obsolete and will be removed in a future version. The recommended alternative is the overload that also takes IModelBinder and ModelMetadata parameters.")>]
abstract member BindModelAsync : Microsoft.AspNetCore.Mvc.ActionContext * Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider * Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor * obj -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult>
override this.BindModelAsync : Microsoft.AspNetCore.Mvc.ActionContext * Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider * Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor * obj -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult>
Public Overridable Function BindModelAsync (actionContext As ActionContext, valueProvider As IValueProvider, parameter As ParameterDescriptor, value As Object) As Task(Of ModelBindingResult)
Parametry
- actionContext
- ActionContext
Element ActionContext.
- valueProvider
- IValueProvider
Element IValueProvider.
- parameter
- ParameterDescriptor
Element ParameterDescriptor.
- value
- Object
Początkowa wartość modelu.
Zwraca
Wynik powiązania modelu.
- Atrybuty
Dotyczy
BindModelAsync(ActionContext, IModelBinder, IValueProvider, ParameterDescriptor, ModelMetadata, Object)
- Źródło:
- ParameterBinder.cs
- Źródło:
- ParameterBinder.cs
- Źródło:
- ParameterBinder.cs
Tworzy powiązanie modelu określonego przy użyciu parameter
jako value
wartości początkowej.
public:
virtual System::Threading::Tasks::Task<Microsoft::AspNetCore::Mvc::ModelBinding::ModelBindingResult> ^ BindModelAsync(Microsoft::AspNetCore::Mvc::ActionContext ^ actionContext, Microsoft::AspNetCore::Mvc::ModelBinding::IModelBinder ^ modelBinder, Microsoft::AspNetCore::Mvc::ModelBinding::IValueProvider ^ valueProvider, Microsoft::AspNetCore::Mvc::Abstractions::ParameterDescriptor ^ parameter, Microsoft::AspNetCore::Mvc::ModelBinding::ModelMetadata ^ metadata, System::Object ^ value);
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult> BindModelAsync (Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder modelBinder, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider, Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor parameter, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, object value);
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult> BindModelAsync (Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder modelBinder, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider, Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor parameter, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, object? value);
abstract member BindModelAsync : Microsoft.AspNetCore.Mvc.ActionContext * Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder * Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider * Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor * Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata * obj -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult>
override this.BindModelAsync : Microsoft.AspNetCore.Mvc.ActionContext * Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder * Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider * Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor * Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata * obj -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult>
Public Overridable Function BindModelAsync (actionContext As ActionContext, modelBinder As IModelBinder, valueProvider As IValueProvider, parameter As ParameterDescriptor, metadata As ModelMetadata, value As Object) As Task(Of ModelBindingResult)
Parametry
- actionContext
- ActionContext
Element ActionContext.
- modelBinder
- IModelBinder
Element IModelBinder.
- valueProvider
- IValueProvider
Element IValueProvider.
- parameter
- ParameterDescriptor
Element ParameterDescriptor.
- metadata
- ModelMetadata
Element ModelMetadata.
- value
- Object
Początkowa wartość modelu.
Zwraca
Wynik powiązania modelu.
Dotyczy
BindModelAsync(ActionContext, IModelBinder, IValueProvider, ParameterDescriptor, ModelMetadata, Object, Object)
- Źródło:
- ParameterBinder.cs
Tworzy powiązanie modelu określonego przy użyciu parameter
jako value
wartości początkowej.
public:
virtual System::Threading::Tasks::ValueTask<Microsoft::AspNetCore::Mvc::ModelBinding::ModelBindingResult> BindModelAsync(Microsoft::AspNetCore::Mvc::ActionContext ^ actionContext, Microsoft::AspNetCore::Mvc::ModelBinding::IModelBinder ^ modelBinder, Microsoft::AspNetCore::Mvc::ModelBinding::IValueProvider ^ valueProvider, Microsoft::AspNetCore::Mvc::Abstractions::ParameterDescriptor ^ parameter, Microsoft::AspNetCore::Mvc::ModelBinding::ModelMetadata ^ metadata, System::Object ^ value, System::Object ^ container);
public virtual System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult> BindModelAsync (Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder modelBinder, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider, Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor parameter, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, object value, object container);
public virtual System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult> BindModelAsync (Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder modelBinder, Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider valueProvider, Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor parameter, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, object? value, object? container);
abstract member BindModelAsync : Microsoft.AspNetCore.Mvc.ActionContext * Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder * Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider * Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor * Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata * obj * obj -> System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult>
override this.BindModelAsync : Microsoft.AspNetCore.Mvc.ActionContext * Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder * Microsoft.AspNetCore.Mvc.ModelBinding.IValueProvider * Microsoft.AspNetCore.Mvc.Abstractions.ParameterDescriptor * Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata * obj * obj -> System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingResult>
Public Overridable Function BindModelAsync (actionContext As ActionContext, modelBinder As IModelBinder, valueProvider As IValueProvider, parameter As ParameterDescriptor, metadata As ModelMetadata, value As Object, container As Object) As ValueTask(Of ModelBindingResult)
Parametry
- actionContext
- ActionContext
Element ActionContext.
- modelBinder
- IModelBinder
Element IModelBinder.
- valueProvider
- IValueProvider
Element IValueProvider.
- parameter
- ParameterDescriptor
Element ParameterDescriptor.
- metadata
- ModelMetadata
Element ModelMetadata.
- value
- Object
Początkowa wartość modelu.
- container
- Object
Kontener dla modelu.
Zwraca
Wynik powiązania modelu.