Describes a numeric range. Used by RangeAttribute.
Implements
Namespace: Metalama.Patterns.Contracts.Numeric
Assembly: Metalama.Patterns.Contracts.dll
Syntax
[RunTimeOrCompileTime]
public readonly struct NumericRange : ICompileTimeSerializableConstructors
| Name | Description |
|---|---|
| NumericRange(NumericBound?, NumericBound?) | Initializes a new instance of the NumericRange struct. |
Properties
| Name | Description |
|---|---|
| MaxValue | Gets the maximal value, or |
| MinValue | Gets the minimal value, or |
Methods
| Name | Description |
|---|---|
| Create(decimal?, decimal?, bool) | |
| Create(double?, double?, bool) | |
| Create(long?, long?, bool) | |
| Create(ulong?, ulong?, bool) | |
| IsInRange(decimal) | Determines if a value of type decimal is in the current range. |
| IsInRange(double) | Determines if a value of type double is in the current range. |
| IsInRange(long) | Determines if a value of type long is in the current range. |
| IsInRange(object?) | Determines if a value of unknown type is in the current range. Returns |
| IsInRange(ulong) | Determines if a value of type ulong is in the current range. |
| ToString() |