- Timestamp:
- 12/10/14 10:31:41 (10 years ago)
- Location:
- branches/ALPS
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ALPS
-
branches/ALPS/HeuristicLab.Problems.Instances.DataAnalysis
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis (added) merged: 11540,11623,11650
- Property svn:mergeinfo changed
-
branches/ALPS/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Classification/ResourceClassificationInstanceProvider.cs
r11171 r11677 23 23 using System.Globalization; 24 24 using System.IO; 25 using System.IO.Compression; 25 26 using System.Linq; 26 27 using System.Reflection; 27 28 using System.Text.RegularExpressions; 28 29 using HeuristicLab.Problems.DataAnalysis; 29 using ICSharpCode.SharpZipLib.Zip;30 30 31 31 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 38 38 39 39 var instanceArchiveName = GetResourceName(FileName + @"\.zip"); 40 using (var instancesZipFile = new Zip File(GetType().Assembly.GetManifestResourceStream(instanceArchiveName))) {40 using (var instancesZipFile = new ZipArchive(GetType().Assembly.GetManifestResourceStream(instanceArchiveName), ZipArchiveMode.Read)) { 41 41 var entry = instancesZipFile.GetEntry(descriptor.ResourceName); 42 42 NumberFormatInfo numberFormat; 43 43 DateTimeFormatInfo dateFormat; 44 44 char separator; 45 using (Stream stream = instancesZipFile.GetInputStream(entry)) {45 using (Stream stream = entry.Open()) { 46 46 TableFileParser.DetermineFileFormat(stream, out numberFormat, out dateFormat, out separator); 47 47 } 48 48 49 49 TableFileParser csvFileParser = new TableFileParser(); 50 using (Stream stream = instancesZipFile.GetInputStream(entry)) {50 using (Stream stream = entry.Open()) { 51 51 csvFileParser.Parse(stream, numberFormat, dateFormat, separator, true); 52 52 } -
branches/ALPS/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Classification/UCI/UCIInstanceProvider.cs
r11171 r11677 23 23 using System.Collections.Generic; 24 24 using System.IO; 25 using System.IO.Compression; 25 26 using System.Linq; 26 using ICSharpCode.SharpZipLib.Zip;27 27 28 28 namespace HeuristicLab.Problems.Instances.DataAnalysis { … … 56 56 var solutionsArchiveName = GetResourceName(FileName + @"\.zip"); 57 57 if (!String.IsNullOrEmpty(solutionsArchiveName)) { 58 using (var solutionsZipFile = new Zip InputStream(GetType().Assembly.GetManifestResourceStream(solutionsArchiveName))) {58 using (var solutionsZipFile = new ZipArchive(GetType().Assembly.GetManifestResourceStream(solutionsArchiveName), ZipArchiveMode.Read)) { 59 59 IList<string> entries = new List<string>(); 60 ZipEntry curEntry; 61 while ((curEntry = solutionsZipFile.GetNextEntry()) != null) { 60 foreach (var curEntry in solutionsZipFile.Entries) { 62 61 entries.Add(curEntry.Name); 63 62 }
Note: See TracChangeset
for help on using the changeset viewer.