Partager via


ValidationAttributeAdapterProvider.GetAttributeAdapter Méthode

Définition

Crée un IAttributeAdapter pour l’attribut donné.

public:
 virtual Microsoft::AspNetCore::Mvc::DataAnnotations::IAttributeAdapter ^ GetAttributeAdapter(System::ComponentModel::DataAnnotations::ValidationAttribute ^ attribute, Microsoft::Extensions::Localization::IStringLocalizer ^ stringLocalizer);
public Microsoft.AspNetCore.Mvc.DataAnnotations.IAttributeAdapter GetAttributeAdapter (System.ComponentModel.DataAnnotations.ValidationAttribute attribute, Microsoft.Extensions.Localization.IStringLocalizer stringLocalizer);
public Microsoft.AspNetCore.Mvc.DataAnnotations.IAttributeAdapter? GetAttributeAdapter (System.ComponentModel.DataAnnotations.ValidationAttribute attribute, Microsoft.Extensions.Localization.IStringLocalizer? stringLocalizer);
abstract member GetAttributeAdapter : System.ComponentModel.DataAnnotations.ValidationAttribute * Microsoft.Extensions.Localization.IStringLocalizer -> Microsoft.AspNetCore.Mvc.DataAnnotations.IAttributeAdapter
override this.GetAttributeAdapter : System.ComponentModel.DataAnnotations.ValidationAttribute * Microsoft.Extensions.Localization.IStringLocalizer -> Microsoft.AspNetCore.Mvc.DataAnnotations.IAttributeAdapter
Public Function GetAttributeAdapter (attribute As ValidationAttribute, stringLocalizer As IStringLocalizer) As IAttributeAdapter

Paramètres

attribute
ValidationAttribute

Attribut pour lequel créer un adaptateur.

stringLocalizer
IStringLocalizer

Localiseur à fournir à l’adaptateur.

Retours

IAttributeAdapter pour l’attribut donné.

Implémente

S’applique à