Esempio n. 1
0
        public void Refresh(DateRange dateRange, int startIndex, HistoricalPeriod historicalPeriod, int number)
        {
            this.HistoricalPeriod = historicalPeriod;
            HtmlWeb htmlWeb = new HtmlWeb();
            string url =
            googleQueryHistoricalPrices + exchange + ":" + stock +
                "&" + dateRange.StartDateAsParameter +
                "&" + dateRange.EndDateAsParameter + 
                "&" + "histperiod=" + Enum.GetName(typeof(HistoricalPeriod), historicalPeriod) +
                "&" + "start=" + startIndex + 
                "&" + "num=" + number;

            this.htmlDocument = htmlWeb.Load(url);
            Prices = new List<HistoricalPrice>();
            Parse();
        }
Esempio n. 2
0
 public HistoricalPrices(HtmlDocument htmlDocument, DateRange dateRange, int startIndex, HistoricalPeriod historicalPeriod)
 {
     // TODO: Fixup this constructor so it does the proper things.
     this.htmlDocument = htmlDocument;
     Prices = new List<HistoricalPrice>();
     Parse();
 }