Interface IRounder
Namespace: LemonEdge.API.Entities.FinancialServices.Processors
Assembly: LemonEdge.API.Entities.FinancialServices.dll
Syntax
public interface IRounder
Properties
Currency
The number of decimal places to round to (from DecimalPlaces) when using RoundToCurrency(decimal)
Declaration
ICurrency Currency { get; set; }
Property Value
Type | Description |
---|---|
ICurrency |
DefaultRounding
The number of decimal places to round to when using RoundToDefault(decimal)
Declaration
short DefaultRounding { get; set; }
Property Value
Type | Description |
---|---|
short |
Level
The rounding level to apply by default when using RoundToLevel(decimal)
Declaration
RoundingLevel Level { get; set; }
Property Value
Type | Description |
---|---|
RoundingLevel |
Methods
RoundToCurrency(decimal)
Rounds the specified value to the number of decimal places associated with the Rounder.Currency.Currency
Declaration
decimal RoundToCurrency(decimal value)
Parameters
Type | Name | Description |
---|---|---|
decimal | value | The value to be rounded |
Returns
Type | Description |
---|---|
decimal | The specified value rounded to the number of decimal places associated with the Rounder.Currency |
RoundToDefault(decimal)
Rounds the specified value to the number of decimal places associated with the Rounder.DefaultRounding
Declaration
decimal RoundToDefault(decimal value)
Parameters
Type | Name | Description |
---|---|---|
decimal | value | The value to be rounded |
Returns
Type | Description |
---|---|
decimal | The specified value rounded to the number of decimal places associated with the Rounder.DefaultRounding |
RoundToLevel(decimal)
Rounds the specified value to the number of decimal places specified using Rounder.Level.Level
Declaration
decimal RoundToLevel(decimal value)
Parameters
Type | Name | Description |
---|---|---|
decimal | value | The value to be rounded |
Returns
Type | Description |
---|---|
decimal | The specified value rounded to the number of decimal places specified using Rounder.Level |
RoundToLevel(decimal, RoundingLevel)
Rounds the specified value to the number of decimal places specified by the level
Declaration
decimal RoundToLevel(decimal value, RoundingLevel level)
Parameters
Type | Name | Description |
---|---|---|
decimal | value | The value to be rounded |
RoundingLevel | level | The number of decimal places to round the value to |
Returns
Type | Description |
---|---|
decimal | The specified value rounded to the number of decimal places specified by the |