public static Stock GetStock(DynamicNodeContext nodeContext) { using (var service = new StockService()) { return service.Get(GetStockCode()); } }
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); } } }