} // End BeginProcessing protected override void ProcessRecord() { MasterBootRecord mbr = MasterBootRecord.Get(drivePath); if (mbr.PartitionTable[0].SystemID == "EFI_GPT_DISK") { if (asBytes) { WriteObject(GuidPartitionTable.GetBytes(drivePath)); } else { WriteObject(new GuidPartitionTable(drivePath)); } } else { if (asBytes) { WriteObject(MasterBootRecord.GetBytes(drivePath)); } else { WriteObject(mbr); } } } // End ProcessRecord
} // End BeginProcessing protected override void ProcessRecord() { if (asBytes) { WriteObject(GuidPartitionTable.GetBytes(drivePath)); } else { WriteObject(new GuidPartitionTable(drivePath)); } } // End ProcessRecord