Mono.Cecil.PE.ImageReader.ReadSections C# (CSharp) Method

ReadSections() private method

private ReadSections ( ushort count ) : void
count ushort
return void
        void ReadSections(ushort count)
        {
            var sections = new Section [count];

            for (int i = 0; i < count; i++) {
                var section = new Section ();

                // Name
                section.Name = ReadZeroTerminatedString (8);

                // VirtualSize		4
                Advance (4);

                // VirtualAddress	4
                section.VirtualAddress = ReadUInt32 ();
                // SizeOfRawData	4
                section.SizeOfRawData = ReadUInt32 ();
                // PointerToRawData	4
                section.PointerToRawData = ReadUInt32 ();

                // PointerToRelocations		4
                // PointerToLineNumbers		4
                // NumberOfRelocations		2
                // NumberOfLineNumbers		2
                // Characteristics			4
                Advance (16);

                sections [i] = section;
            }

            image.Sections = sections;
        }