PostSharp6.2/API Reference/Post­Sharp.​Aspects.​Advices Namespace/Location­Validation­Advice Class

LocationValidationAdvice Class

Custom attribute that, when applied on a method of an aspect class, specifies that this method has the same semantic as the ValidateValue(T, String, LocationKind, LocationValidationContext) method of the ILocationValidationAspect<T> interface.
Inheritance Hierarchy
System.Object
  System.Attribute
    PostSharp.Aspects.Advices.Advice
      PostSharp.Aspects.Advices.GroupingAdvice
        PostSharp.Aspects.Advices.LocationValidationAdvice

Namespace:  PostSharp.Aspects.Advices
Assembly:  PostSharp (in PostSharp.dll) Version: 6.2.11.0 (6.2.11.0)
Syntax
C#
public class LocationValidationAdvice : GroupingAdvice

The LocationValidationAdvice type exposes the following members.

Constructors
  NameDescription
Public methodLocationValidationAdvice
Initializes a new instance of the LocationValidationAdvice class
Properties
  NameDescription
Public propertyDescription
A human-readable description of the current advice.
(Inherited from Advice.)
Public propertyLinesOfCodeAvoided
Reduction in the code lines count achieved by applying the advice instance to one code element.
(Inherited from Advice.)
Public propertyMaster
Name of the master advice method. If this property is not set, the current method is itself the master of the group. Only master methods can define selectors (Pointcut) and dependencies (AspectDependencyAttribute).
(Inherited from GroupingAdvice.)
Public propertyPriority
Determines a priority for selecting a validation method from a group when more than one method matches the target element type. A method with a lower value has priority over a method with a higher value.
Remarks

The method to which this custom attribute is applied must be public and must have the same signature as ValidateValue(T, String, LocationKind, LocationValidationContext), where T can be any type. However, the method can be static.

See Also