MetalamaAPI documentationPatterns APIMetalama.​Patterns.​ContractsStrictly­Positive­Attribute
Open sandboxFocus

StrictlyPositiveAttribute Class

Custom attribute that, when added to a field, property or parameter, throws an System.ArgumentOutOfRangeException if the target is assigned a value smaller than or equal to zero.

Inheritance
System.Object
StrictlyPositiveAttribute
Namespace: Metalama.Patterns.Contracts
Assembly: Metalama.Patterns.Contracts.dll
Syntax
[RunTimeOrCompileTime]
public class StrictlyPositiveAttribute : StrictlyGreaterThanAttribute, 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
StrictlyPositiveAttribute()

Initializes a new instance of the StrictlyPositiveAttribute class.

See Also