コード例 #1
0
        public void UpdateCurrencyAmount(string currency, double amount)
        {
            var mutable = CurrencyAmounts.ToDictionary(x => x.Key, x => x.Value);

            mutable[currency] += amount;
            CurrencyAmounts    = mutable.ToImmutableDictionary <string, double>();
        }
コード例 #2
0
 private void OnSerializing(StreamingContext context)
 {
     _LatestTrades    = LatestTrades.ToArray();
     _CurrencyAmounts = CurrencyAmounts.ToDictionary(x => x.Key, x => x.Value);
 }