Ejemplo n.º 1
0
        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    if (DestinationLocation != null)
                    {
                        DestinationLocation.Clear();
                    }
                    if (SourceLocation != null)
                    {
                        SourceLocation.Clear();
                    }
                    FileList.Clear();
                    FileList = null;
                    ArchiveMemoryStream.Dispose();
                    if (File.Exists(WorkingArchive))
                    {
                        File.Delete(WorkingArchive);
                    }
                }

                disposedValue = true;
            }
        }
 /// <summary>
 /// Closes the archive.
 /// </summary>
 public void CloseArchive()
 {
     ArchiveMemoryStream.Dispose();
     EncryptedPackageUtilities.CompressArchive(WorkingArchive, DestinationLocation.ToString(), Password);
 }