ParameterBinder.BindModelAsync Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Surcharges
BindModelAsync(ActionContext, IValueProvider, ParameterDescriptor)
- Source:
- ParameterBinder.cs
- Source:
- ParameterBinder.cs
Attention
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.
Cette surcharge de méthode est obsolète et sera supprimée dans une version ultérieure. L'alternative recommandée est BindModelAsync(ActionContext, IModelBinder, IValueProvider, ParameterDescriptor, ModelMetadata, Object).
Initialise et lie un modèle spécifié par 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);
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)
Paramètres
- actionContext
- ActionContext
L’ActionContextopérateur
- valueProvider
- IValueProvider
L’IValueProvideropérateur
- parameter
- ParameterDescriptor
Retours
Résultat de la liaison de modèle.
- Attributs
S’applique à
BindModelAsync(ActionContext, IValueProvider, ParameterDescriptor, Object)
- Source:
- ParameterBinder.cs
- Source:
- ParameterBinder.cs
Attention
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.
Cette surcharge de méthode est obsolète et sera supprimée dans une version ultérieure. L'alternative recommandée est BindModelAsync(ActionContext, IModelBinder, IValueProvider, ParameterDescriptor, ModelMetadata, Object).
Lie un modèle spécifié en parameter
utilisant value
comme valeur initiale.
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)
Paramètres
- actionContext
- ActionContext
L’ActionContextopérateur
- valueProvider
- IValueProvider
L’IValueProvideropérateur
- parameter
- ParameterDescriptor
- value
- Object
Valeur du modèle initial.
Retours
Résultat de la liaison de modèle.
- Attributs
S’applique à
BindModelAsync(ActionContext, IModelBinder, IValueProvider, ParameterDescriptor, ModelMetadata, Object)
- Source:
- ParameterBinder.cs
- Source:
- ParameterBinder.cs
- Source:
- ParameterBinder.cs
Lie un modèle spécifié en parameter
utilisant value
comme valeur initiale.
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)
Paramètres
- actionContext
- ActionContext
L’ActionContextopérateur
- modelBinder
- IModelBinder
L’IModelBinderopérateur
- valueProvider
- IValueProvider
L’IValueProvideropérateur
- parameter
- ParameterDescriptor
- metadata
- ModelMetadata
L’ModelMetadataopérateur
- value
- Object
Valeur du modèle initial.
Retours
Résultat de la liaison de modèle.
S’applique à
BindModelAsync(ActionContext, IModelBinder, IValueProvider, ParameterDescriptor, ModelMetadata, Object, Object)
- Source:
- ParameterBinder.cs
Lie un modèle spécifié en parameter
utilisant value
comme valeur initiale.
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)
Paramètres
- actionContext
- ActionContext
L’ActionContextopérateur
- modelBinder
- IModelBinder
L’IModelBinderopérateur
- valueProvider
- IValueProvider
L’IValueProvideropérateur
- parameter
- ParameterDescriptor
- metadata
- ModelMetadata
L’ModelMetadataopérateur
- value
- Object
Valeur du modèle initial.
- container
- Object
Conteneur du modèle.
Retours
Résultat de la liaison de modèle.