Class DoubleInfo
This class represents metadata properties common to all source generated Primitively numeric types.
Implements
Inherited Members
Namespace: Primitively
Assembly: Primitively.Abstractions.dll
Syntax
public sealed record DoubleInfo : NumericInfo<double>, IEquatable<PrimitiveInfo>, INumericInfo, IEquatable<NumericInfo<double>>, IEquatable<DoubleInfo>
Constructors
DoubleInfo(Type, string?, Func<string?, IPrimitive>, double, double, int, MidpointRounding)
This class represents metadata properties common to all source generated Primitively numeric types.
Declaration
public DoubleInfo(Type Type, string? Example, Func<string?, IPrimitive> CreateFrom, double Minimum, double Maximum, int Digits, MidpointRounding Mode)
Parameters
Type | Name | Description |
---|---|---|
Type | Type | The .NET type of the Primitively type. |
string | Example | An optional example of the integer. |
Func<string, IPrimitive> | CreateFrom | A function that creates an instance of the Primitively type from a string. |
double | Minimum | The minimum value that can be set on the source generated Primitively type. |
double | Maximum | The maximum value that can be set on the source generated Primitively type. |
int | Digits | The number of fractional digits in the value on the source generated Primitively type |
MidpointRounding | Mode | The rounding specification for how to round value of the source generated Primitively type if it is midway between two other numbers. |
Properties
Digits
The number of fractional digits in the value on the source generated Primitively type
Declaration
public int Digits { get; init; }
Property Value
Type | Description |
---|---|
int |
Mode
The rounding specification for how to round value of the source generated Primitively type if it is midway between two other numbers.
Declaration
public MidpointRounding Mode { get; init; }
Property Value
Type | Description |
---|---|
MidpointRounding |