private void InvokeCompressionCompleteEvents(Exception exception)
        {
            if (exception == null)
            {
                File.Delete(tempFilePath);
                if (CompressionError != null)
                {
                    CompressionComplete.Invoke(this, null);
                }
            }
            else
            {
                try
                {
                    File.Delete(finalFilePath);
                }
                catch (Exception) { }

                if (CompressionError != null)
                {
                    CompressionError.Invoke(this, new ErrorEventArgs(new Exception("Error during compresion: " + exception.Message)));
                }
            }
        }
Example #2
0
 protected virtual void OnCompressionComplete(ZipEventArgs args)
 {
     CompressionComplete?.Invoke(this, args);
 }