public SimpleTimeSeries(TimeSeries source):base(source) { if (source == null) { Events = new TimeSeriesEvent[0]; return; } IList<TimeSeriesEvent> eventList = new List<TimeSeriesEvent>(); for (int i = 0; i < source.count(); i++) eventList.Add(new TimeSeriesEvent { Date = source.timeForItem(i).ToString(CultureInfo.InvariantCulture), Value = source[i] }); Events = eventList.ToArray(); }
public SimpleTimeSeries(TimeSeries source) : base(source) { if (source == null) { Events = new TimeSeriesEvent[0]; return; } IList <TimeSeriesEvent> eventList = new List <TimeSeriesEvent>(); #if BeforeCaseRefactor for (int i = 0; i < source.count(); i++) #else for (int i = 0; i < source.Count; i++) #endif { eventList.Add(new TimeSeriesEvent { Date = source.timeForItem(i).ToString(CultureInfo.InvariantCulture), Value = source[i] }); } Events = eventList.ToArray(); }