ModelValidationContext 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立 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)
參數
- actionContext
- ActionContext
ActionContext用於驗證的 。
- modelMetadata
- ModelMetadata
ModelMetadata用於驗證的 。
- metadataProvider
- IModelMetadataProvider
IModelMetadataProvider要用於驗證的 。
- container
- Object
模型容器。
- model
- Object
要驗證的模型。