Open sandboxFocus

Class GreaterThanOrEqualAttribute

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

Namespace: Metalama.Patterns.Contracts
Assembly: Metalama.Patterns.Contracts.dll
Syntax
public class GreaterThanOrEqualAttribute : RangeAttribute, 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
GreaterThanOrEqualAttribute(byte)

Initializes a new instance of the GreaterThanOrEqualAttribute class specifying a minimum value of type byte.

GreaterThanOrEqualAttribute(decimal)

Initializes a new instance of the GreaterThanOrEqualAttribute class specifying a minimum value of type decimal.

GreaterThanOrEqualAttribute(double)

Initializes a new instance of the GreaterThanOrEqualAttribute class specifying a minimum value of type double.

GreaterThanOrEqualAttribute(short)

Initializes a new instance of the GreaterThanOrEqualAttribute class specifying a minimum value of type short.

GreaterThanOrEqualAttribute(int, int)

Initializes a new instance of the GreaterThanOrEqualAttribute class specifying a minimum value of type int.

GreaterThanOrEqualAttribute(long, int)

Initializes a new instance of the GreaterThanOrEqualAttribute class specifying a minimum value of type long.

GreaterThanOrEqualAttribute(sbyte)

Initializes a new instance of the GreaterThanOrEqualAttribute class specifying a minimum value of type sbyte.

GreaterThanOrEqualAttribute(float)

Initializes a new instance of the GreaterThanOrEqualAttribute class specifying a minimum value of type float.

GreaterThanOrEqualAttribute(ushort)

Initializes a new instance of the GreaterThanOrEqualAttribute class specifying a minimum value of type ushort.

GreaterThanOrEqualAttribute(uint)

Initializes a new instance of the GreaterThanOrEqualAttribute class specifying a minimum value of type uint.

GreaterThanOrEqualAttribute(ulong)

Initializes a new instance of the GreaterThanOrEqualAttribute class specifying a minimum value of type ulong.

Methods

Name Description
OnContractViolated(dynamic?, NumericRange, ContractContext)

Extension Methods

See Also