public static StockDividend Get(DynamicNodeContext nodeContext) { using (var service = new DividendService()) { var stockCode = GetStockCode(); var exDate = GetExDate(); return service.Get(stockCode, exDate); } }
public static IEnumerable<StockDividend> Get(DynamicNodeContext nodeContext, int count) { using (var service = new DividendService()) { var stockCode = GetStockCode(); if (string.IsNullOrEmpty(stockCode)) { return service.GetLatest(count).ToList(); } return service.Get(stockCode, count).ToList(); } }