Show / Hide Table of Contents

Class ImageValidationAttribute

Base class for constraint validation attributes that should trigger common validation

Inheritance
object
Attribute
ValidationAttribute
ImageValidationAttribute
ProportionsAttribute
RequiredImageAttribute
SizeAttribute
Inherited Members
ValidationAttribute.FormatErrorMessage(string)
ValidationAttribute.GetValidationResult(object, ValidationContext)
ValidationAttribute.IsValid(object, ValidationContext)
ValidationAttribute.Validate(object, ValidationContext)
ValidationAttribute.Validate(object, string)
ValidationAttribute.ErrorMessage
ValidationAttribute.ErrorMessageResourceName
ValidationAttribute.ErrorMessageResourceType
ValidationAttribute.ErrorMessageString
Attribute.Equals(object)
Attribute.GetCustomAttribute(Assembly, Type)
Attribute.GetCustomAttribute(Assembly, Type, bool)
Attribute.GetCustomAttribute(MemberInfo, Type)
Attribute.GetCustomAttribute(MemberInfo, Type, bool)
Attribute.GetCustomAttribute(Module, Type)
Attribute.GetCustomAttribute(Module, Type, bool)
Attribute.GetCustomAttribute(ParameterInfo, Type)
Attribute.GetCustomAttribute(ParameterInfo, Type, bool)
Attribute.GetCustomAttributes(Assembly)
Attribute.GetCustomAttributes(Assembly, bool)
Attribute.GetCustomAttributes(Assembly, Type)
Attribute.GetCustomAttributes(Assembly, Type, bool)
Attribute.GetCustomAttributes(MemberInfo)
Attribute.GetCustomAttributes(MemberInfo, bool)
Attribute.GetCustomAttributes(MemberInfo, Type)
Attribute.GetCustomAttributes(MemberInfo, Type, bool)
Attribute.GetCustomAttributes(Module)
Attribute.GetCustomAttributes(Module, bool)
Attribute.GetCustomAttributes(Module, Type)
Attribute.GetCustomAttributes(Module, Type, bool)
Attribute.GetCustomAttributes(ParameterInfo)
Attribute.GetCustomAttributes(ParameterInfo, bool)
Attribute.GetCustomAttributes(ParameterInfo, Type)
Attribute.GetCustomAttributes(ParameterInfo, Type, bool)
Attribute.GetHashCode()
Attribute.IsDefaultAttribute()
Attribute.IsDefined(Assembly, Type)
Attribute.IsDefined(Assembly, Type, bool)
Attribute.IsDefined(MemberInfo, Type)
Attribute.IsDefined(MemberInfo, Type, bool)
Attribute.IsDefined(Module, Type)
Attribute.IsDefined(Module, Type, bool)
Attribute.IsDefined(ParameterInfo, Type)
Attribute.IsDefined(ParameterInfo, Type, bool)
Attribute.Match(object)
Attribute.TypeId
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: AdaptiveImages.Validation
Assembly: AdaptiveImages.dll
Syntax
public abstract class ImageValidationAttribute : ValidationAttribute

Properties

FormFactor

Gets or sets one or more form factors for which the validation attribute applies

Declaration
public FormFactor FormFactor { get; set; }
Property Value
Type Description
FormFactor
Remarks

Bitwise OR supported, for example FormFactor.Large | FormFactor.Medium to make attribute apply to both Large and Medium form factors

RequiresValidationContext

Indicates this attribute requires validation context

Declaration
public override bool RequiresValidationContext { get; }
Property Value
Type Description
bool
Overrides
ValidationAttribute.RequiresValidationContext

Methods

IsValid(object?)

Always returns true because image validation attributes require a validation context, actual validation is performed by AdaptiveImageValidator as validation may apply to a combination of attributes

Declaration
public override bool IsValid(object? value)
Parameters
Type Name Description
object value

The property being validated

Returns
Type Description
bool

True

Overrides
ValidationAttribute.IsValid(object)

Extension Methods

ImageExtensions.GetCultureSpecificImageAttribute<TContent, TProperty>(TContent, Expression<Func<TContent, TProperty>>)
ImageExtensions.GetImageConstraints<TParent>(TParent, string)
ImageExtensions.GetImageConstraints<TParent, TProperty>(TParent, Expression<Func<TParent, TProperty>>)
ImageExtensions.GetImageRenderSettings<TParent, TProperty>(TParent, Expression<Func<TParent, TProperty>>)
ImageExtensions.GetImageRenderSettings<TParent, TProperty>(TParent, Expression<Func<TParent, TProperty>>, FormFactor)
ImageExtensions.GetProportionsConstraint<TParent>(TParent, string)
ImageExtensions.GetProportionsConstraint<TParent>(TParent, string, FormFactor)
ImageExtensions.GetProportionsConstraint<TParent, TProperty>(TParent, Expression<Func<TParent, TProperty>>)
ImageExtensions.GetRequiredImageAttribute<TContent, TProperty>(TContent, Expression<Func<TContent, TProperty>>)
ImageExtensions.GetSizeConstraint<TContent, TProperty>(TContent, Expression<Func<TContent, TProperty>>)
☀
☾
In this article
Back to top
Documentation applies to: Adaptive Images 2.x
☀
☾