Currency Currency
Currency Currency
DocFX + Singulink = ♥

Search Results for

    Interface IReadOnlyMoneyBag

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

    Inherited Members
    IReadOnlyCollection<MonetaryValue>.Count
    IEnumerable<MonetaryValue>.GetEnumerator()
    IFormattable.ToString(string, IFormatProvider)
    Namespace: Singulink.Globalization
    Assembly: Singulink.Globalization.Currency.dll
    Syntax
    public interface IReadOnlyMoneyBag : IReadOnlyCollection<MonetaryValue>, IEnumerable<MonetaryValue>, IEnumerable, IFormattable

    Properties

    Name Description
    Currencies

    Gets the currencies that this bag contains.

    IsSorted

    Gets a value indicating whether this bag is sorted by each value's currency code.

    this[Currency]

    Gets the value this bag contains of the specified currency. Returns the default monetary value if it does not contain the currency.

    this[string]

    Gets the value this bag contains with the specified currency code. Returns the default monetary value if it does not contain the currency.

    Registry

    Gets the currency registry associated with this bag.

    Methods

    Name Description
    Contains(MonetaryValue)

    Determines whether this bag contains the specified value.

    Contains(decimal, Currency)

    Determines whether this bag contains the specified amount and currency.

    Contains(decimal, string)

    Determines whether this bag contains the specified amount and currency code.

    ContainsCurrency(Currency)

    Determines whether this bag contains a value with the specified currency.

    ContainsCurrency(string)

    Determines whether this bag contains a value with the specified currency code.

    Create(CurrencyRegistry, IEnumerable<MonetaryValue>)

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

    TryGetAmount(Currency, out decimal)

    Gets the amount associated with the specified currency.

    TryGetAmount(string, out decimal)

    Gets the amount associated with the specified currency code.

    TryGetValue(Currency, out MonetaryValue)

    Gets the monetary value associated with the specified currency.

    TryGetValue(string, out MonetaryValue)

    Gets the monetary value associated with the specified currency code.

    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.