public GetDataResponse(dynamic jsonObject) { Interval = jsonObject.interval; ProfileData = new ProfileData(jsonObject.profileData); if (jsonObject.date_from.Value != null) { DateFrom = BankierCommon.ParseEpochTime(jsonObject.date_from); } if (jsonObject.date_to.Value != null) { DateTo = BankierCommon.ParseEpochTime(jsonObject.date_to); } if (jsonObject.intraday != null) { Intraday = jsonObject.intraday; } for (int i = 0; i < jsonObject.main.Count; ++i) { Intervals.Add(new IntervalDetail() { Date = BankierCommon.ParseEpochTime(jsonObject.main[i][0]), Price = jsonObject.main[i][1], Volume = jsonObject.volume[i][1] }); } }
public ProfileData(dynamic jsonObject) { changeValue = jsonObject.changeValue; EndDate = BankierCommon.ParseDate(jsonObject.endDate); StartDate = BankierCommon.ParseDate(jsonObject.startDate); Interval = jsonObject.interval; Max = jsonObject.max; MaxDate = BankierCommon.ParseDateShort(jsonObject.maxValueDate); Min = jsonObject.min; MinDate = BankierCommon.ParseDateShort(jsonObject.minValueDate); PreviousClose = jsonObject.prevCloseDB[1]; PreviousCloseDate = BankierCommon.ParseDateShort(jsonObject.prevCloseDate); ValueAverage = jsonObject.valueAverage; ValueSum = jsonObject.valueSum; }