Commit Graph

14 Commits

Author SHA1 Message Date
Paul Newman
8faebc78d0 Cancel moved from EntryStream to Reader
Relates to previous commit. Following discussion with Adam, moved the Cancel() to the reader.

Example:

while (reader.MoveToNextEntry())
{
  using (var data = new StreamReader(reader.OpenEntryStream()))
  {
    try
    {
      DoSomething(data.ReadLine());
    }
    catch
    {
      reader.Cancel();
      throw;
    }
  }
}
2015-07-15 18:13:46 +01:00
Paul Newman
afff386622 Skip entry stream on dispose
Until now the caller had to completely consume each entry stream, or call SkipEntry(), before disposing the stream. If not, exception was thrown: "EntryStream has not been fully consumed". Hugely inconvenient; a user-thrown exception inside a "using (EntryStream)" block would be discarded.

Now automatically skips the entry on dispose.

Added method EntryStream.Cancel(). Call this if entry stream is unfinished, and no further entries are required. Helps with efficiency, as it avoids reading data that is not needed.
2015-07-15 13:44:20 +01:00
larvata
7e3f04e669 add entryExtractionEvent for stream 2014-12-22 16:34:47 +08:00
Adam Hathcock
66ffc82d41 Entries don't have FilePaths, they have keys 2013-12-23 12:20:06 +00:00
Adam Hathcock
e58ec599f0 Cleaning up some FileInfo non-usage and fixing tests. 2013-12-23 12:15:57 +00:00
Adam Hathcock
4eda2043df Moved ExtractTo to common logic 2013-12-23 11:42:08 +00:00
Adam Hathcock
afd65a7505 Removed unimplemented Close 2013-12-23 11:12:07 +00:00
Hamdanil Rasyid
37c4665630 Make password a parameter 2013-07-15 00:35:35 +08:00
Adam Hathcock
692bebf658 Better message for supported types
Changed exception message in Reader/Archive Factory to list the
supported types.
2013-05-28 19:34:41 +01:00
Adam Hathcock
455f93f294 Windows Store version compiles 2013-04-28 13:01:29 +01:00
Adam Hathcock
257e85d8bf Removed 3.5 project. Added WinRT project 2013-04-28 12:41:29 +01:00
Adam Hathcock
fcf86b738e Resharper code cleanup 2013-04-28 12:32:55 +01:00
Adam Hathcock
ab9155dfc5 zip/gzip skipping now doesn't involve decompression https://github.com/simmotech/sharpcompress 2013-04-28 11:07:13 +01:00
Adam Hathcock
7ce4b7d076 Initial commit 2013-04-07 10:58:58 +01:00