public SevenZipSharedArchiveContext(IntPtr archivePtr, SevenZipFormatInfo formatInfo, Nomad.FileSystem.Archive.SevenZip.StreamWrapper wrapper)
 {
     this.FArchivePtr = archivePtr;
     this.ArchiveLock = new object();
     this.ArchivePassword = new SecureString[1];
     this.FormatInfo = formatInfo;
     this.ArchiveStreamWrapper = wrapper;
 }
 protected void Dispose(bool disposing)
 {
     if (this.FArchive != null)
     {
         if (disposing)
         {
             this.Archive.Close();
         }
         Marshal.FinalReleaseComObject(this.FArchive);
         this.FArchive = null;
     }
     if (this.FArchivePtr != IntPtr.Zero)
     {
         Marshal.Release(this.FArchivePtr);
         this.FArchivePtr = IntPtr.Zero;
     }
     if (this.ArchiveStreamWrapper != null)
     {
         this.ArchiveStreamWrapper.Dispose();
         this.ArchiveStreamWrapper = null;
     }
 }