// Can be called from within ZipEntry.InternalExtract.
        internal bool OnSingleEntryExtract(ZipEntry entry, string path, bool before)
        {
            EventHandler <ExtractProgressEventArgs> ep = ExtractProgress;

            if (ep != null)
            {
                var e = (before)
                    ? ExtractProgressEventArgs.BeforeExtractEntry(ArchiveNameForEvent, entry, path)
                    : ExtractProgressEventArgs.AfterExtractEntry(ArchiveNameForEvent, entry, path);
                ep(this, e);
                if (e.Cancel)
                {
                    _extractOperationCanceled = true;
                }
            }
            return(_extractOperationCanceled);
        }
예제 #2
0
 // Can be called from within ZipEntry.InternalExtract.
 internal bool OnSingleEntryExtract(ZipEntry entry, string path, bool before)
 {
     if (ExtractProgress != null)
     {
         lock (LOCK)
         {
             var e = (before)
     ? ExtractProgressEventArgs.BeforeExtractEntry(ArchiveNameForEvent, entry, path)
     : ExtractProgressEventArgs.AfterExtractEntry(ArchiveNameForEvent, entry, path);
             ExtractProgress(this, e);
             if (e.Cancel)
             {
                 _extractOperationCanceled = true;
             }
         }
     }
     return(_extractOperationCanceled);
 }