public void Boot() { var bb = BootFile.Load(@"..\..\TestFiles\Boot\$Boot"); Debug.WriteLine($"$Boot.BootEntryPoint: {bb.BootEntryPoint}"); Debug.WriteLine($"$Boot.FileSystemSignature: {bb.FileSystemSignature}"); Debug.WriteLine($"$Boot.BytesPerSector: {bb.BytesPerSector}"); Debug.WriteLine($"$Boot.SectorsPerCluster: {bb.SectorsPerCluster}"); Debug.WriteLine($"$Boot.ReservedSectors: {bb.ReservedSectors}"); Debug.WriteLine($"$Boot.MediaDescriptor: {bb.MediaDescriptor:X} ({bb.DecodeMediaDescriptor()})"); Debug.WriteLine($"$Boot.SectorsPerTrack: {bb.SectorsPerTrack}"); Debug.WriteLine($"$Boot.NumberOfHeads: {bb.NumberOfHeads}"); Debug.WriteLine($"$Boot.NumberOfHiddenSectors: {bb.NumberOfHiddenSectors}"); Debug.WriteLine($"$Boot.TotalSectors: {bb.TotalSectors}"); Debug.WriteLine($"$Boot.MftClusterBlockNumber: {bb.MftClusterBlockNumber}"); Debug.WriteLine($"$Boot.MirrorMftClusterBlockNumber: {bb.MirrorMftClusterBlockNumber}"); Debug.WriteLine($"$Boot.MftEntrySize: {bb.MftEntrySize}"); Debug.WriteLine($"$Boot.IndexEntrySize: {bb.IndexEntrySize}"); Debug.WriteLine($"$Boot.VolumeSerialNumber 64: {bb.GetVolumeSerialNumber()}"); Debug.WriteLine($"$Boot.VolumeSerialNumber 32: {bb.GetVolumeSerialNumber(true)}"); Debug.WriteLine($"$Boot.VolumeSerialNumber 32 rev: {bb.GetVolumeSerialNumber(true, true)}"); Debug.WriteLine($"$Boot.SectorSignature: {bb.GetSectorSignature()}"); }
protected sealed override bool Perform(BootFile file) { DataBootTable table = new DataBootTable(file as DataBootFile, mListing); if (table.IsValid) { Loader results = new Loader(this, mField); table.Load(results.Load); foreach (BootFile result in results.mFiles) { if (!result.IsValid) { continue; } Perform(result); } } else { PerformFile(file); } return(true); }
protected override bool Perform(BootFile file) { DataBootTable table = new DataBootTable(file as DataBootFile, mListing); if (!table.IsValid) { return(false); } table.Load(Perform); return(true); }
public virtual void Perform(bool testDirect) { try { BootFile straightFile = null; if (testDirect) { straightFile = GetBootFile(mReference, mReference, true); } if ((straightFile != null) && (straightFile.IsValid)) { Perform(straightFile); } else { List <BootFile> files; if (!sFiles.TryGetValue(mReference, out files)) { files = new List <BootFile>(); sFiles.Add(mReference, files); foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies()) { if (assembly.GetType(mReference) == null) { continue; } BootFile file = GetBootFile(mReference, assembly.GetName().Name + ".dll", true); if (file.IsValid) { files.Add(file); } } } foreach (BootFile file in files) { Perform(file); } } } catch (Exception e) { Common.Exception(mReference, e); } }
protected sealed override void PerformFile(BootFile file) { DataBootTable table = new DataBootTable(file as DataBootFile, mTable); if (!table.IsValid) { if (file.mPrimary) { BooterLogger.AddTrace(file + ": No " + mTable + " Table"); } else { BooterLogger.AddError(file + ": No " + mTable + " Table"); } return; } table.Load(Perform); }
protected abstract void Perform(BootFile file, XmlDbRow row);
public void Load(BootFile file, XmlDbRow row) { mFiles.Add(mBooter.GetBootFile(file.ToString(), row.GetString(mField), false)); }
protected abstract void PerformFile(BootFile file);
protected abstract bool Perform(BootFile file);
protected sealed override bool Perform(BootFile file) { DataBootTable table = new DataBootTable(file as DataBootFile, mListing); if (table.IsValid) { Loader results = new Loader(this, mField); table.Load(results.Load); foreach (BootFile result in results.mFiles) { if (!result.IsValid) continue; Perform(result); } } else { PerformFile(file); } return true; }
protected override bool Perform(BootFile file) { DataBootTable table = new DataBootTable(file as DataBootFile, mListing); if (!table.IsValid) return false; table.Load(Perform); return true; }