public static Stock GetStock(DynamicNodeContext nodeContext) { using (var service = new StockService()) { return service.Get(GetStockCode()); } }
public static StockQuote GetLatestQuote(DynamicNodeContext nodeContext) { using (var service = new StockService()) { return service.GetLatestQuote(GetStockCode()); } }
public static IEnumerable<Quote> GetQuotes(DynamicNodeContext nodeContext) { using (var service = new StockService()) { return service.GetQuotes(GetStockCode(), new DateTime(DateTime.Now.Year, 1, 1), DateTime.Now); } }
public StockController() { _stockService = new StockService(); }
private void AddStocks(ref StringBuilder urls) { using (var stockService = new StockService()) { var stocks = stockService.Get(); foreach (var stock in stocks) { urls.AppendFormat(@"<url> <loc>http://fatdividends.com.au/stock-information/{0}</loc> <lastmod>{1}</lastmod> <changefreq>daily</changefreq> </url>", stock.Code, stock.LastRefreshDateTime); } } }