Open sandboxFocus

Enum InequalityStrictness

Enumerates the meanings of inequalities of unspecified strictness such as GreaterThanAttribute, LessThanAttribute, PositiveAttribute and NegativeAttribute.

Namespace: Metalama.Patterns.Contracts
Assembly: Metalama.Patterns.Contracts.dll
Syntax
[CompileTime]
public enum InequalityStrictness

Fields

Name Description
NonStrict

Inequalities of unspecified strictness are interpreted as non-strict, i.e. [GreaterThan(5)] corresponds to x >= 5, [LessThan(5)] corresponds to x <= 5, [Positive] corresponds to x >= 0 and [Negative] corresponds to x <= 0. This is currently the default strictness, but a warning will be reported unless you explicitly set the DefaultInequalityStrictness contract option.

Strict

Inequalities of unspecified strictness are interpreted as strict, i.e. [GreaterThan(5)] corresponds to x > 5, [LessThan(5)] corresponds to x < 5, [Positive] corresponds to x > 0 and [Negative] corresponds to x < 0.