/// <summary> /// The ProcessRecord outputs a MasterBootRecord GuidPartitionTable object for the specified Device /// </summary> 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(GuidPartitionTable.Get(drivePath)); } } else { if (asBytes) { WriteObject(MasterBootRecord.GetBytes(drivePath)); } else { WriteObject(mbr); } } }
/// <summary> /// The ProcessRecord outputs a GuidPartitionTable object for the specified Drive Path /// </summary> protected override void ProcessRecord() { if (asBytes) { WriteObject(GuidPartitionTable.GetBytes(drivePath)); } else { WriteObject(GuidPartitionTable.Get(drivePath)); } }
/// <summary> /// The ProcessRecord instantiates a MasterBootRecord Object /// and outputs all Partitions that are not of the EMPTY type /// </summary> protected override void ProcessRecord() { MasterBootRecord mbr = MasterBootRecord.Get(drivePath); if (mbr.PartitionTable[0].SystemId != "EFI_GPT_DISK") { WriteObject(mbr.GetPartitionTable(), true); } else { WriteObject(GuidPartitionTable.Get(drivePath).GetPartitionTable(), true); } }