Exemple #1
0
        /// <summary>
        /// Disposes of this instance.
        /// </summary>
        /// <param name="disposing"><c>true</c> if disposing, else <c>false</c></param>
        protected override void Dispose(bool disposing)
        {
            try
            {
                _metaDataStream.Dispose();
                _metaDataStream = null;

                _file = null;
            }
            finally
            {
                base.Dispose(disposing);
            }
        }
Exemple #2
0
        internal WimFileSystem(WimFile file, int index)
        {
            _file = file;

            ShortResourceHeader metaDataFileInfo = _file.LocateImage(index);

            if (metaDataFileInfo == null)
            {
                throw new ArgumentException("No such image: " + index, "index");
            }

            _metaDataStream = _file.OpenResourceStream(metaDataFileInfo);
            ReadSecurityDescriptors();

            _dirCache = new ObjectCache <long, List <DirectoryEntry> >();
        }