Partager via


ModelValidationContext Constructeur

Définition

Créez une nouvelle instance de ModelValidationContext.

public:
 ModelValidationContext(Microsoft::AspNetCore::Mvc::ActionContext ^ actionContext, Microsoft::AspNetCore::Mvc::ModelBinding::ModelMetadata ^ modelMetadata, Microsoft::AspNetCore::Mvc::ModelBinding::IModelMetadataProvider ^ metadataProvider, System::Object ^ container, System::Object ^ model);
public ModelValidationContext (Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata modelMetadata, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, object container, object model);
public ModelValidationContext (Microsoft.AspNetCore.Mvc.ActionContext actionContext, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata modelMetadata, Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider metadataProvider, object? container, object? model);
new Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ModelValidationContext : Microsoft.AspNetCore.Mvc.ActionContext * Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata * Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider * obj * obj -> Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ModelValidationContext
Public Sub New (actionContext As ActionContext, modelMetadata As ModelMetadata, metadataProvider As IModelMetadataProvider, container As Object, model As Object)

Paramètres

actionContext
ActionContext

pour la ActionContext validation.

modelMetadata
ModelMetadata

pour la ModelMetadata validation.

metadataProvider
IModelMetadataProvider

IModelMetadataProvider à utiliser dans la validation.

container
Object

Conteneur de modèle.

model
Object

Modèle à valider.

S’applique à