public static RootObjectC GetJsonCalculation() { Task <string> t = GetLibraCalculationAsync(); t.Wait(); string rawData = t.Result; RootObjectC jsonData = JsonConvert.DeserializeObject <RootObjectC>(rawData); return(jsonData); }
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); }
private IEnumerable <QvxDataRow> GetCalculationData() { RootObjectC jsonCalculation = GetJsonCalculation(); yield return(MakeEntryC(jsonCalculation, FindTable("Calculation", MTables))); }