/// <summary> /// /// </summary> /// <returns></returns> public List<AbhiGoalCustomData> GetData() { int count = 0; var list = new List<AbhiGoalCustomData>(); using (StreamReader inputStream = new StreamReader(_dataSourceUri)) { downloadedData = inputStream.ReadToEnd(); var inputProcessor = new AhiGoalLineParser(); list = inputProcessor.ProcessStreamIntoList(downloadedData); } // For Development just get a few symbols // return list.Where(s => s.symbol == "FAST" || s.symbol == "DNB" || s.symbol == "JNJ" || s.symbol == "LLL").Cast<AbhiGoalCustomData>().ToList(); return list; }
/// <summary> /// Retrieves the data from the web /// </summary> /// <returns>a list of AbhiGoalCustomData objects, one for each row in the csv file</returns> public List<AbhiGoalCustomData> GetData() { int count = 0; var list = new List<AbhiGoalCustomData>(); using (WebClient wClient = new WebClient()) { downloadedData = wClient.DownloadString(_dataSourceUri); } var inputProcessor = new AhiGoalLineParser(); list = inputProcessor.ProcessStreamIntoList(downloadedData); //return list.Where(s => s.symbol == "FAST" || s.symbol == "DNB" || s.symbol == "JNJ" || s.symbol == "LLL").Cast<AbhiGoalCustomData>().ToList(); return list; }