Esempio n. 1
0
 void ReadProgress1(object sender, ReadProgressEventArgs e)
 {
     switch (e.EventType)
     {
         case ZipProgressEventType.Reading_Started:
             TestContext.WriteLine("Reading_Started");
             break;
         case ZipProgressEventType.Reading_Completed:
             TestContext.WriteLine("Reading_Completed");
             break;
         case ZipProgressEventType.Reading_BeforeReadEntry:
             TestContext.WriteLine("Reading_BeforeReadEntry");
             break;
         case ZipProgressEventType.Reading_AfterReadEntry:
             TestContext.WriteLine("Reading_AfterReadEntry: {0}",
                                   e.CurrentEntry.FileName);
             break;
         case ZipProgressEventType.Reading_ArchiveBytesRead:
             break;
     }
 }
Esempio n. 2
0
 internal static ReadProgressEventArgs Completed(string archiveName)
 {
     var x = new ReadProgressEventArgs(archiveName, ZipProgressEventType.Reading_Completed);
     return x;
 }
Esempio n. 3
0
 internal static ReadProgressEventArgs After(string archiveName, ZipEntry entry, int entriesTotal)
 {
     var x = new ReadProgressEventArgs(archiveName, ZipProgressEventType.Reading_AfterReadEntry);
     x.EntriesTotal = entriesTotal;
     x.CurrentEntry = entry;
     return x;
 }
Esempio n. 4
0
 internal static ReadProgressEventArgs ByteUpdate(string archiveName, ZipEntry entry, Int64 bytesXferred, Int64 totalBytes)
 {
     var x = new ReadProgressEventArgs(archiveName, ZipProgressEventType.Reading_ArchiveBytesRead);
     x.CurrentEntry = entry;
     x.BytesTransferred = bytesXferred;
     x.TotalBytesToTransfer = totalBytes;
     return x;
 }
Esempio n. 5
0
 internal static ReadProgressEventArgs Before(string archiveName, int entriesTotal)
 {
     var x = new ReadProgressEventArgs(archiveName, ZipProgressEventType.Reading_BeforeReadEntry);
     x.EntriesTotal = entriesTotal;
     return x;
 }