MetalamaAPI documentationPatterns APIMetalama.​Patterns.​Contracts.​NumericNumeric­Range
Open sandboxFocus

NumericRange Class

Describes a numeric range. Used by RangeAttribute.

Inheritance
System.Object
NumericRange
Namespace: Metalama.Patterns.Contracts.Numeric
Assembly: Metalama.Patterns.Contracts.dll
Syntax
[RunTimeOrCompileTime]
public sealed class NumericRange : ValueType, ICompileTimeSerializable

Constructors

Name Description
NumericRange(NumericBound, NumericBound)

Initializes a new instance of the NumericRange struct.

Properties

Name Description
MaxValue

Gets the maximal value, or null if the range has no maximal value.

MinValue

Gets the minimal value, or null if the range has no minimal value.

Methods

Name Description
Create(Nullable<Decimal>, Nullable<Decimal>, Boolean)
Create(Nullable<Double>, Nullable<Double>, Boolean)
Create(Nullable<Int64>, Nullable<Int64>, Boolean)
Create(Nullable<UInt64>, Nullable<UInt64>, Boolean)
IsInRange(Decimal)

Determines if a value of type System.Decimal is in the current range.

IsInRange(Double)

Determines if a value of type System.Double is in the current range.

IsInRange(Int64)

Determines if a value of type System.Int64 is in the current range.

IsInRange(Object)

Determines if a value of unknown type is in the current range. Returns false if the type is unsupported.

IsInRange(UInt64)

Determines if a value of type System.UInt64 is in the current range.

ToString()

See Also