mirror of
https://github.com/modernw/App-Installer-For-Windows-8.x-Reset.git
synced 2026-06-17 21:00:08 +10:00
Organized the project files.
And also fixed some bugs.
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
namespace PriFileFormat
|
||||
{
|
||||
public class TocEntry
|
||||
{
|
||||
public string SectionIdentifier { get; }
|
||||
public ushort Flags { get; }
|
||||
public ushort SectionFlags { get; }
|
||||
public uint SectionQualifier { get; }
|
||||
public uint SectionOffset { get; }
|
||||
public uint SectionLength { get; }
|
||||
private TocEntry (string sectionIdentifier, ushort flags, ushort sectionFlags, uint sectionQualifier, uint sectionOffset, uint sectionLength)
|
||||
{
|
||||
SectionIdentifier = sectionIdentifier;
|
||||
Flags = flags;
|
||||
SectionFlags = sectionFlags;
|
||||
SectionQualifier = sectionQualifier;
|
||||
SectionOffset = sectionOffset;
|
||||
SectionLength = sectionLength;
|
||||
}
|
||||
internal static TocEntry Parse (BinaryReader binaryReader)
|
||||
{
|
||||
return new TocEntry (
|
||||
new string (binaryReader.ReadChars (16)),
|
||||
binaryReader.ReadUInt16 (),
|
||||
binaryReader.ReadUInt16 (),
|
||||
binaryReader.ReadUInt32 (),
|
||||
binaryReader.ReadUInt32 (),
|
||||
binaryReader.ReadUInt32 ());
|
||||
}
|
||||
public override string ToString ()
|
||||
{
|
||||
return $"{SectionIdentifier.TrimEnd ('\0', ' ')} length: {SectionLength}";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user