Example #1
0
        public DateTime? GetLastTradeDate(KLineType type, string stockCode)
        {
            ThrowIfTypeNotSupport(type);

            if (type == KLineType.Day)
            {
                string dbFilePath = new Day1KLineFile(stockCode).GetFilePath();
                KLineRepository repository = new KLineRepository(dbFilePath);
                return repository.GetLastTradeDate();
            }
            else
            {
                throw new NotSupportedException();
            }
        }