public MarketBasket FILE() { MarketBasket mb = new MarketBasket(); if ((_file == "") || (_file == null)) { return(mb); } System.IO.StreamReader sr = null; try { sr = new System.IO.StreamReader(_file); } catch (Exception) { return(mb); } string file = sr.ReadToEnd(); if (_nyse && _linkedonly) { mb.Add(ParseStocks.LinkedOnlyNYSE(file)); } else if (_nyse) { mb.Add(ParseStocks.NYSE(file)); } if (_nasd && _linkedonly) { mb.Add(ParseStocks.LinkedOnlyNASDAQ(file)); } else if (_nasd) { mb.Add(ParseStocks.NASDAQ(file)); } if (_xdupe) { mb = Fetch.RemoveDupe(mb); } return(mb); }
public static MarketBasket LinkedNASDAQFromURL(string url) { WebClient wc = new WebClient(); return(ParseStocks.LinkedOnlyNASDAQ(wc.DownloadString(url))); }
public static MarketBasket NYSEFromURL(string url) { WebClient wc = new WebClient(); return(ParseStocks.NYSE(wc.DownloadString(url))); }