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); }
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; }