Beispiel #1
0
 protected void parseZip(Stream zipStream, EDSVListType listType)
 {
     ZipArchive archive = new ZipArchive(zipStream, ZipArchiveMode.Read);
     {
         foreach (ZipArchiveEntry entry in archive.Entries)
         {
             if (entry.FullName.StartsWith(listTypeToPrefix[listType], System.StringComparison.InvariantCultureIgnoreCase) &&
                 entry.FullName.EndsWith(".txt"))
             {
                 _dsvList = System.IO.Path.GetFileNameWithoutExtension(entry.FullName).ToUpper();
                 _stream  = entry.Open();
                 return;
             }
         }
     }
 }
Beispiel #2
0
 public DSVImportReaderOnline(EDSVListType listType)
 {
     parseZip(getZipOnlineStream(), listType);
 }
Beispiel #3
0
        public DSVImportReaderZip(string path, EDSVListType listType)
        {
            _zipPath = path;

            parseZip(new FileStream(_zipPath, FileMode.Open, FileAccess.Read, FileShare.Read), listType);
        }