ILocationValidationAspect<T> Interface
Runtime semantics of an aspect that, when applied on a location (field, property, or parameter), validates the value assigned to this location using method ValidateValue(T, String, LocationKind), and throws the exception returned by this method if any.

Namespace: PostSharp.Aspects
Assembly: PostSharp (in PostSharp.dll) Version: 4.3.31.0 (4.3.31.0)
Syntax
C#
public interface ILocationValidationAspect<T> : ILocationValidationAspect, 
	IAspect

Type Parameters

T
Type of values validated by the current aspect.

The ILocationValidationAspect<T> type exposes the following members.

Methods
  NameDescription
Public methodValidateValue
Validates the value being assigned to the location to which the current aspect has been applied.
Top
Remarks

An aspect will typically implement several generic instances of the current interface, with different values of T. The aspect can be applied only to locations for which there is an exact type match. PostSharp does not implement any type conversion, even when this conversion is implicitly supported by the compiler, for instance int to long. Therefore, if your aspect must be able to validate all integers, you may need to implement the interface instances for T ranging in long, int, short, sbyte and possibly their unsigned variant. However, values of a derived type can be validated if T is the base type.

See Also