Udostępnij za pośrednictwem


ModelValidationContext Konstruktor

Definicja

Utwórz nowe wystąpienie klasy 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)

Parametry

actionContext
ActionContext

Element ActionContext do weryfikacji.

modelMetadata
ModelMetadata

Element ModelMetadata do weryfikacji.

metadataProvider
IModelMetadataProvider

Element IModelMetadataProvider do użycia w walidacji.

container
Object

Kontener modelu.

model
Object

Model do zweryfikowania.

Dotyczy