コード例 #1
0
 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);
 }
コード例 #2
0
        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());
        }