Currency Currency
Currency Currency
DocFX + Singulink = ♥

Search Results for

    Interface IMoneyBag

    Represents a bag of monetary values in one or more currencies.

    Inherited Members
    ICollection<MonetaryValue>.Clear()
    ICollection<MonetaryValue>.Contains(MonetaryValue)
    ICollection<MonetaryValue>.CopyTo(MonetaryValue[], int)
    ICollection<MonetaryValue>.Remove(MonetaryValue)
    ICollection<MonetaryValue>.IsReadOnly
    IReadOnlyMoneyBag.this[string]
    IReadOnlyMoneyBag.this[Currency]
    IReadOnlyMoneyBag.Currencies
    IReadOnlyMoneyBag.IsSorted
    IReadOnlyMoneyBag.Registry
    IReadOnlyMoneyBag.Contains(decimal, Currency)
    IReadOnlyMoneyBag.Contains(decimal, string)
    IReadOnlyMoneyBag.ContainsCurrency(Currency)
    IReadOnlyMoneyBag.ContainsCurrency(string)
    IReadOnlyMoneyBag.TryGetAmount(Currency, out decimal)
    IReadOnlyMoneyBag.TryGetAmount(string, out decimal)
    IReadOnlyMoneyBag.TryGetValue(Currency, out MonetaryValue)
    IReadOnlyMoneyBag.TryGetValue(string, out MonetaryValue)
    IEnumerable<MonetaryValue>.GetEnumerator()
    IFormattable.ToString(string, IFormatProvider)
    Namespace: Singulink.Globalization
    Assembly: Singulink.Globalization.Currency.dll
    Syntax
    public interface IMoneyBag : ICollection<MonetaryValue>, IReadOnlyMoneyBag, IReadOnlyCollection<MonetaryValue>, IEnumerable<MonetaryValue>, IEnumerable, IFormattable

    Properties

    Name Description
    Count

    Gets the number of values/currencies in this bag.

    Methods

    Name Description
    Add(MonetaryValue)

    Adds the specified value to this bag.

    Add(decimal, Currency)

    Adds the specified currency and amount to this bag.

    Add(decimal, string)

    Adds the specified currency and amount to this bag.

    AddRange(IEnumerable<MonetaryValue>)

    Adds the specified values to this bag.

    Create(CurrencyRegistry, IEnumerable<MonetaryValue>)

    Creates a bag that uses the specified currency registry and adds all the specified values.

    Remove(Currency)

    Removes the value with the given currency.

    Remove(string)

    Removes the value with the given currency code.

    RemoveAll(IEnumerable<Currency>)

    Removes all the values from this bag that match the specified currencies.

    RemoveAll(Func<MonetaryValue, bool>)

    Removes all the values from this bag that match the specified predicate and returns the resulting bag.

    RoundToCurrencyDigits()

    Rounds each value's amount to its currency's DecimalDigits using ToEven midpoint rounding (i.e. "banker's rounding").

    RoundToCurrencyDigits(MidpointRounding)

    Rounds each value's amount to its currency's DecimalDigits using the specified midpoint rounding mode.

    SetAmount(decimal, Currency)

    Sets the amount the bag contains for the specified currency code.

    SetAmount(decimal, string)

    Sets the amount the bag contains for the specified currency code.

    SetValue(MonetaryValue)

    Sets the value this bag contains for the currency of the specified value.

    Subtract(MonetaryValue)

    Subtracts the specified value from this bag. Zero amounts are not trimmed from the bag.

    Subtract(decimal, Currency)

    Adds the specified currency and amount to this bag.

    Subtract(decimal, string)

    Subtracts the specified currency and amount from this bag. Zero amounts are not trimmed from the bag.

    SubtractRange(IEnumerable<MonetaryValue>)

    Subtracts the specified values from this bag. Zero amounts are not trimmed from the bag.

    TransformAmounts(Func<decimal, decimal>)

    Applies the specified transformation to each value's amount in this bag.

    TransformAmounts(Func<decimal, decimal?>)

    Applies the specified transformation to each value's amount in this bag. Amounts transformed to a null amount are removed.

    TransformValues(Func<MonetaryValue, decimal>)

    Applies the specified transformation to each value's amount in this bag.

    TransformValues(Func<MonetaryValue, decimal?>)

    Applies the specified transformation to each value's amount in this bag. Values transformed to a null amount are removed.

    TrimZeroAmounts()

    Removes all zero amounts from this bag.

    Extension Methods

    MoneyCollectionExtensions.ToImmutableMoneyBag(IReadOnlyMoneyBag)
    MoneyCollectionExtensions.ToImmutableMoneyBag(IReadOnlyMoneyBag, CurrencyRegistry)
    MoneyCollectionExtensions.ToImmutableSortedMoneyBag(IReadOnlyMoneyBag)
    MoneyCollectionExtensions.ToImmutableSortedMoneyBag(IReadOnlyMoneyBag, CurrencyRegistry)
    MoneyCollectionExtensions.ToMoneyBag(IReadOnlyMoneyBag)
    MoneyCollectionExtensions.ToMoneyBag(IReadOnlyMoneyBag, CurrencyRegistry)
    MoneyCollectionExtensions.ToSortedMoneyBag(IReadOnlyMoneyBag)
    MoneyCollectionExtensions.ToSortedMoneyBag(IReadOnlyMoneyBag, CurrencyRegistry)
    MoneyCollectionExtensions.ToImmutableMoneyBag(IEnumerable<MonetaryValue>, CurrencyRegistry)
    MoneyCollectionExtensions.ToImmutableSortedMoneyBag(IEnumerable<MonetaryValue>, CurrencyRegistry)
    MoneyCollectionExtensions.ToMoneyBag(IEnumerable<MonetaryValue>, CurrencyRegistry)
    MoneyCollectionExtensions.ToSortedMoneyBag(IEnumerable<MonetaryValue>, CurrencyRegistry)
    © Singulink. All rights reserved.