예제 #1
0
        public static string FormatCurrency(
            this decimal value,
            GooCurrency currency,
            bool addPlusSign          = false,
            bool returnEmptyForZeroes = false)
        {
            string sign;
            bool   signBefore;

            switch (currency)
            {
            case GooCurrency.Usd:
                sign       = "$ ";
                signBefore = true;
                break;

            case GooCurrency.Eur:
                sign       = " €";
                signBefore = false;
                break;

            case GooCurrency.Rub:
                sign       = " ₽";
                signBefore = false;
                break;

            default:
                sign       = $" {currency.ToString().ToUpper()}";
                signBefore = false;
                break;
            }

            return(Format(value, sign, signBefore, addPlusSign, returnEmptyForZeroes, 4));
        }
예제 #2
0
 public GooOperationMarketInstrumentGroup(
     GooMarketInstrument marketInstrument,
     GooCurrency currency,
     GooOperationPair[] pairs)
 {
     MarketInstrument = marketInstrument;
     Currency         = currency;
     Pairs            = pairs;
 }