internal void CSVToCategory(FileInfo local) { DateTime ts; string preTs; string postTs; foreach (string match in filenames_type.Keys) { if (local.FullName.Contains(match)) { if (ParseTimeStamp(local.FullName, true, out ts, out preTs, out postTs)) { CachedReportFile rf = new CachedReportFile(local, filenames_type[match], Path, preTs, postTs, match, ts); if (_files.ContainsKey(rf.LocalFile.FullName) == false) { _files.Add(rf); if (_allreports.ContainsKey(ts) == false) { _allreports.Add(ts, new Dictionary <SynoReportType, ICachedReportFile>()); } if (_allreports[ts].ContainsKey(filenames_type[match]) == false) { _allreports[ts].Add(filenames_type[match], rf); } } } break; } } }
internal void CSVToCategory(string filename) { DateTime ts; string preTs; string postTs; foreach (string match in filenames_type.Keys) { if (filename.Contains(match)) { CachedReportFile rf = new CachedReportFile(filename, filenames_type[match], Path); _files.Add(rf); if (ParseTimeStamp(filename, false, out ts, out preTs, out postTs)) { if (_allreports.ContainsKey(ts) == false) { _allreports.Add(ts, new Dictionary <SynoReportType, ICachedReportFile>()); } _allreports[ts].Add(filenames_type[match], rf); } break; } } }