Partager via


IValidationAttributeAdapterProvider.GetAttributeAdapter Méthode

Définition

Retourne le IAttributeAdapter pour le donné ValidationAttribute.

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);
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
Public Function GetAttributeAdapter (attribute As ValidationAttribute, stringLocalizer As IStringLocalizer) As IAttributeAdapter

Paramètres

stringLocalizer
IStringLocalizer

qui sera utilisé pour créer des IStringLocalizer messages.

Retours

pour IAttributeAdapter le donné attribute.

S’applique à