예제 #1
0
 public static TransHistory ReadFromJObject(JObject o)
 {
     return(new TransHistory
     {
         List =
             ((IDictionary <string, JToken>)o).ToDictionary(a => int.Parse(a.Key),
                                                            a =>
                                                            Transaction.ReadFromJObject(a.Value as JObject))
     });
 }
예제 #2
0
        public static TransHistory ReadFromJObject(JObject o)
        {
            var r = new TransHistory();

            r.List = new Dictionary <int, Transaction>();
            foreach (var item in o)
            {
                var transId = int.Parse(item.Key);
                var trans   = Transaction.ReadFromJObject(item.Value as JObject);
                r.List.Add(transId, trans);
            }

            return(r);
        }
예제 #3
0
        public static TransHistory ReadFromJObject(JObject o)
        {
            var list = new TransHistory();

            list.List = new Dictionary <int, Transaction>();
            foreach (var VARIABLE in o)
            {
                list.List.Add(key: int.Parse(VARIABLE.Key.ToString()), value: Transaction.ReadFromJObject(VARIABLE.Value as JObject));
            }
            return(list);
            //return new TransHistory() {
            //    List = o.OfType<KeyValuePair<string,JToken>>().ToDictionary(a=>int.Parse(a.Key), a=>Transaction.ReadFromJObject(a.Value as JObject))
            //};
        }
예제 #4
0
 public static TransHistory ReadFromJObject(JObject o)
 {
     return(new TransHistory()
     {
         List = o.OfType <KeyValuePair <string, JToken> >().ToDictionary(a => int.Parse(a.Key), a => Transaction.ReadFromJObject(a.Value as JObject))
     });
 }