Example #1
0
 /// <summary>
 /// Constructor for the ExtractProgressEventArgs.
 /// </summary>
 /// <param name="archiveName">the name of the zip archive.</param>
 /// <param name="before">whether this is before saving the entry, or after</param>
 /// <param name="entriesTotal">The total number of entries in the zip archive.</param>
 /// <param name="entriesExtracted">Number of entries that have been extracted.</param>
 /// <param name="entry">The entry involved in the event.</param>
 /// <param name="extractLocation">The location to which entries are extracted.</param>
 internal ExtractProgressEventArgs(string archiveName, bool before, int entriesTotal, int entriesExtracted, ZipEntry entry, string extractLocation)
     : base(archiveName, (before) ? ZipProgressEventType.Extracting_BeforeExtractEntry : ZipProgressEventType.Extracting_AfterExtractEntry)
 {
     this.EntriesTotal      = entriesTotal;
     this.CurrentEntry      = entry;
     this._entriesExtracted = entriesExtracted;
     this._target           = extractLocation;
 }
Example #2
0
        internal static ExtractProgressEventArgs AfterExtractEntry(string archiveName, ZipEntry entry, string extractLocation)
        {
            var x = new ExtractProgressEventArgs
            {
                ArchiveName  = archiveName,
                EventType    = ZipProgressEventType.Extracting_AfterExtractEntry,
                CurrentEntry = entry,
                _target      = extractLocation,
            };

            return(x);
        }
Example #3
0
 /// <summary>
 /// Constructor for the SaveProgressEventArgs.
 /// </summary>
 /// <param name="archiveName">the name of the zip archive.</param>
 /// <param name="before">whether this is before saving the entry, or after</param>
 /// <param name="entriesTotal">The total number of entries in the zip archive.</param>
 /// <param name="entriesSaved">Number of entries that have been saved.</param>
 /// <param name="entry">The entry involved in the event.</param>
 internal SaveProgressEventArgs(string archiveName, bool before, int entriesTotal, int entriesSaved, ZipEntry entry)
     : base(archiveName, (before) ? ZipProgressEventType.Saving_BeforeWriteEntry : ZipProgressEventType.Saving_AfterWriteEntry)
 {
     this.EntriesTotal  = entriesTotal;
     this.CurrentEntry  = entry;
     this._entriesSaved = entriesSaved;
 }