ClientValidatorCache.GetValidators 方法

定义

IClientModelValidator从缓存中获取元数据的 ,并在需要时使用 validatorProvider 创建。

public:
 System::Collections::Generic::IReadOnlyList<Microsoft::AspNetCore::Mvc::ModelBinding::Validation::IClientModelValidator ^> ^ GetValidators(Microsoft::AspNetCore::Mvc::ModelBinding::ModelMetadata ^ metadata, Microsoft::AspNetCore::Mvc::ModelBinding::Validation::IClientModelValidatorProvider ^ validatorProvider);
public System.Collections.Generic.IReadOnlyList<Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IClientModelValidator> GetValidators (Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata metadata, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IClientModelValidatorProvider validatorProvider);
member this.GetValidators : Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata * Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IClientModelValidatorProvider -> System.Collections.Generic.IReadOnlyList<Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IClientModelValidator>
Public Function GetValidators (metadata As ModelMetadata, validatorProvider As IClientModelValidatorProvider) As IReadOnlyList(Of IClientModelValidator)

参数

metadata
ModelMetadata

正被验证的 ModelMetadata

validatorProvider
IClientModelValidatorProvider

IClientModelValidatorProvider 在需要时用于创建验证器的 。

返回

IClientModelValidator的列表。

适用于