// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using Microsoft.Extensions.Localization;
namespace Microsoft.AspNetCore.Mvc.DataAnnotations
{
///
/// An abstract subclass of which wraps up all the required
/// interfaces for the adapters.
///
/// The type of which is being wrapped.
public abstract class AttributeAdapterBase :
ValidationAttributeAdapter,
IAttributeAdapter
where TAttribute : ValidationAttribute
{
///
/// Instantiates a new .
///
/// The being wrapped.
/// The to be used in error generation.
public AttributeAdapterBase(TAttribute attribute, IStringLocalizer stringLocalizer)
: base(attribute, stringLocalizer)
{
}
///
public abstract string GetErrorMessage(ModelValidationContextBase validationContext);
}
}