示例#1
0
        public static QuoteFileInfo ReadFile(string path)
        {
            DateTime?first;
            DateTime?last;
            bool     endsNewLine;
            var      quoteFileInfo = new QuoteFileInfo {
                FullPath = path
            };

            var qfi = quoteFileInfo;
            var fi  = new FileInfo(path);

            qfi.Size       = fi.Length;
            qfi.TickerName = Path.GetFileNameWithoutExtension(path);

            GetFirstAndLastFileDates(path, out first, out last, out endsNewLine);
            if (!first.HasValue || !last.HasValue)
            {
                return(null);
            }

            quoteFileInfo.StartDate = first.Value;
            quoteFileInfo.EndDate   = last.Value;
            return(qfi);
        }
示例#2
0
        public static QuoteFileInfo ReadFile(string path)
        {
            DateTime? first;
            DateTime? last;
            bool endsNewLine;
            var quoteFileInfo = new QuoteFileInfo {FullPath = path};

            var qfi = quoteFileInfo;
            var fi = new FileInfo(path);
            qfi.Size = fi.Length;
            qfi.TickerName = Path.GetFileNameWithoutExtension(path);

            GetFirstAndLastFileDates(path, out first, out last, out endsNewLine);
            if (!first.HasValue || !last.HasValue) return null;

            quoteFileInfo.StartDate = first.Value;
            quoteFileInfo.EndDate = last.Value;
            return qfi;
        }