Changeset 17414 for branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/ResourceRegressionInstanceProvider.cs
- Timestamp:
- 01/31/20 12:42:47 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/ResourceRegressionInstanceProvider.cs
r17180 r17414 39 39 using (var instancesZipFile = new ZipArchive(GetType().Assembly.GetManifestResourceStream(instanceArchiveName), ZipArchiveMode.Read)) { 40 40 var entry = instancesZipFile.GetEntry(descriptor.ResourceName); 41 NumberFormatInfo numberFormat; 42 DateTimeFormatInfo dateFormat; 43 char separator; 44 using (Stream stream = entry.Open()) { 45 TableFileParser.DetermineFileFormat(stream, out numberFormat, out dateFormat, out separator); 46 } 41 var formatOptions = GetFormatOptions(entry); 47 42 48 43 TableFileParser csvFileParser = new TableFileParser(); 49 44 using (Stream stream = entry.Open()) { 50 csvFileParser.Parse(stream, numberFormat, dateFormat, separator, true);45 csvFileParser.Parse(stream, formatOptions, true); 51 46 } 52 47 … … 64 59 .Where(x => Regex.Match(x, @".*\.Data\." + fileName).Success).SingleOrDefault(); 65 60 } 61 62 protected virtual TableFileFormatOptions GetFormatOptions(ZipArchiveEntry entry) { 63 using (Stream stream = entry.Open()) { 64 return TableFileParser.DetermineFileFormat(stream); 65 } 66 } 66 67 } 67 68 }
Note: See TracChangeset
for help on using the changeset viewer.