Search Results for

    Show / Hide Table of Contents

    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 level

    Extension Methods

    LinqExtensions.AsArray<T>(T)
    LinqExtensions.ToArrayOfOne<T>(T)
    LinqExtensions.ToListOfOne<T>(T)
    MiscExtensions.SetIfNotEqual<T, TP>(T, Expression<Func<T, TP>>, TP)
    WeakReferenceExtensions.WeakReference(object)
    SQLExtensions.ToSQLValue(object, bool)
    ReflectionExtensions.ClearEventInvocations(object, string)
    StringExtensions.ToCSVFormatString(object, Type)
    In this article
    Back to top © LemonEdge Technologies. All rights reserved.