PostSharp 2023.0 / / Post­Sharp Documentation / 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

Namespace:  PostSharp.Aspects.Advices
Assembly:  PostSharp (in PostSharp.dll) Version: 2023.0.3.0 (2023.0.3.0)
public class LocationValidationAdvice : GroupingAdvice

The LocationValidationAdvice type exposes the following members.

Public methodLocationValidationAdvice
Initializes a new instance of the LocationValidationAdvice class
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.

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