private IEnumerable<ExchangeDataViewModel> CreateData() { ExchangeDataViewModel[] data = new ExchangeDataViewModel[] { CreateForexData("EUR/USD"), CreateForexData("EUR/GBP") }; return data; }
private ExchangeDataViewModel CreateForexData(string name) { DateTime now = DateTime.Now; ExchangeDataViewModel exchangeData = new ExchangeDataViewModel() { StartDate = now.Subtract(TimeSpan.FromDays(365d)), EndDate = now, Name = name }; exchangeData.Data = CreateExchangeData(exchangeData.StartDate, exchangeData.EndDate); return exchangeData; }