Exemplo n.º 1
0
        /// <summary>
        /// Populates properties on the current object reading information from the
        /// provided binary reader.
        /// </summary>
        internal void Read()
        {
            using (
                BinaryReader binaryReader = FileHelper.GetBinaryReader(Chassis.FullReadPath, TmlSectorInfoFile,
                                                                       Encoding.GetEncoding(
                                                                           Constants.FileEncodingCodePageNumber))
                )
            {
                InformationHeader.Read(binaryReader);

                for (int sectorIndex = 0; sectorIndex < InformationHeader.SectorCount; sectorIndex++)
                {
                    var sectorInformation = new SectorInformation();

                    sectorInformation.Read(binaryReader);

                    Add(sectorInformation);
                }

                DumpSectorData(RiskBasedFilename(TmsSectorDumpReadFilename), RiskBasedFilename(TmsSectorDumpReadBackupFilename));
            }
        }