Changeset 17414 for branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Classification
- 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/Classification/ResourceClassificationInstanceProvider.cs
r17180 r17414 40 40 using (var instancesZipFile = new ZipArchive(GetType().Assembly.GetManifestResourceStream(instanceArchiveName), ZipArchiveMode.Read)) { 41 41 var entry = instancesZipFile.GetEntry(descriptor.ResourceName); 42 NumberFormatInfo numberFormat; 43 DateTimeFormatInfo dateFormat; 44 char separator; 45 using (Stream stream = entry.Open()) { 46 TableFileParser.DetermineFileFormat(stream, out numberFormat, out dateFormat, out separator); 47 } 42 43 var formatOptions = GetFormatOptions(entry); 48 44 49 45 TableFileParser csvFileParser = new TableFileParser(); 50 46 using (Stream stream = entry.Open()) { 51 csvFileParser.Parse(stream, numberFormat, dateFormat, separator, true);47 csvFileParser.Parse(stream, formatOptions, true); 52 48 } 53 49 … … 65 61 .Where(x => Regex.Match(x, @".*\.Data\." + fileName).Success).SingleOrDefault(); 66 62 } 63 64 protected virtual TableFileFormatOptions GetFormatOptions(ZipArchiveEntry entry) { 65 using (Stream stream = entry.Open()) { 66 return TableFileParser.DetermineFileFormat(stream); 67 } 68 } 67 69 } 68 70 }
Note: See TracChangeset
for help on using the changeset viewer.