Open sandboxFocus

Class NegativeAttribute

Custom attribute that, when added to a field, property or parameter, throws an ArgumentOutOfRangeException if the target is assigned a value greater than zero. The behavior when the target is assigned to zero depends on the DefaultInequalityStrictness option. If this option is not specified, a warning is reported.

Namespace: Metalama.Patterns.Contracts
Assembly: Metalama.Patterns.Contracts.dll
Syntax
[RunTimeOrCompileTime]
public class NegativeAttribute : LessThanAttribute, IAspect<IParameter>, IEligible<IParameter>, IAspect<IFieldOrPropertyOrIndexer>, IEligible<IFieldOrPropertyOrIndexer>, IConditionallyInheritableAspect, IAspect, ICompileTimeSerializable, ITemplateProvider
Remarks

Null values are accepted and do not throw an exception.

Constructors

Name Description
NegativeAttribute()

Initializes a new instance of the NegativeAttribute class.

See Also