ValidationVisitor.Visit(ModelMetadata, String, Object) 方法

定义

验证模型中的内容。

protected:
 virtual bool Visit(Microsoft::AspNetCore::Mvc::ModelBinding::ModelMetadata ^ metadata, System::String ^ key, System::Object ^ model);
protected virtual bool Visit (Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, string key, object model);
protected virtual bool Visit (Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, string? key, object? model);
abstract member Visit : Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata * string * obj -> bool
override this.Visit : Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata * string * obj -> bool
Protected Overridable Function Visit (metadata As ModelMetadata, key As String, model As Object) As Boolean

参数

metadata
ModelMetadata

模型元数据。

key
String

要验证的密钥。

model
Object

要验证的模型。

返回

指定的模型密钥是否有效。

适用于