private bool IsMatched(string tdfFile, DateTime filterDate, string filterSampleId, out TdfInfo tdfInfo) { if (TdfParser.Parse(tdfFile, out tdfInfo)) { return(tdfInfo != null && filterDate.Date == tdfInfo.ScannedTime.Date && (filterSampleId == null || filterSampleId == tdfInfo.SampleId)); } return(false); }
public List <DateTime> GetAllTestDate() { List <TdfInfo> result = new List <TdfInfo>(); var rootFolder = new DirectoryInfo(GlobalConfigVars.DbPath); foreach (FileInfo bdfFileInfo in rootFolder.GetFiles("*.BDF", SearchOption.AllDirectories)) { string tdfFilePath = Path.ChangeExtension(bdfFileInfo.FullName, ".TDF"); TdfInfo tdfInfo; if (TdfParser.Parse(tdfFilePath, out tdfInfo)) { result.Add(tdfInfo); } } return(result.Select(r => r.ScannedTime.Date).Distinct().ToList()); }