Custom attribute that, when added to a field, property or parameter, throws an ArgumentOutOfRangeException if the target is assigned a value smaller than zero.
Inheritance
PositiveAttribute
Namespace: PostSharp.Patterns.Contracts
Assembly: PostSharp.Patterns.Common.dll
Syntax
public class PositiveAttribute : GreaterThanAttribute, ILocationLevelAspect, IValidableAnnotation, IAspectRemarks
Null values are accepted and do not throw an exception.
The error message is identified by GreaterThanErrorMessage.
Constructors
| Name | Description |
|---|---|
| PositiveAttribute() | Initializes a new instance of the PositiveAttribute class. |