コード例 #1
0
        public static RootObjectC GetJsonCalculation()
        {
            Task <string> t = GetLibraCalculationAsync();

            t.Wait();
            string      rawData  = t.Result;
            RootObjectC jsonData = JsonConvert.DeserializeObject <RootObjectC>(rawData);

            return(jsonData);
        }
コード例 #2
0
        private QvxDataRow MakeEntryC(RootObjectC cal, QvxTable table)
        {
            var row = new QvxDataRow();

            row[table.Fields[0]] = cal.method;
            row[table.Fields[1]] = cal.asset;
            row[table.Fields[2]] = cal.period;
            row[table.Fields[3]] = cal.status.ready;
            row[table.Fields[4]] = cal.total_gains.long_term;
            row[table.Fields[5]] = cal.total_gains.total;
            row[table.Fields[6]] = cal.total_gains.unrealized;
            row[table.Fields[7]] = cal.taggable_totals.drinks;
            //row[table.Fields[8]] = cal.categories_totals.accounts_payable;
            //row[table.Fields[9]] = cal.categories_totals.accounts_receivable;

            return(row);
        }
コード例 #3
0
        private IEnumerable <QvxDataRow> GetCalculationData()
        {
            RootObjectC jsonCalculation = GetJsonCalculation();

            yield return(MakeEntryC(jsonCalculation, FindTable("Calculation", MTables)));
        }