REFACTOR: Reformat code.

This commit is contained in:
2017-12-19 20:33:03 +00:00
parent 77edc7c91c
commit e6f6ace80b
704 changed files with 82627 additions and 83641 deletions

View File

@@ -78,8 +78,7 @@ namespace DiscImageChef.Decoders.SCSI.MMC
public static CPRMMediaKeyBlock? DecodeCPRMMediaKeyBlock(byte[] CPRMMKBResponse)
{
if(CPRMMKBResponse == null)
return null;
if(CPRMMKBResponse == null) return null;
CPRMMediaKeyBlock decoded = new CPRMMediaKeyBlock();
@@ -97,18 +96,17 @@ namespace DiscImageChef.Decoders.SCSI.MMC
public static string PrettifyCPRMMediaKeyBlock(CPRMMediaKeyBlock? CPRMMKBResponse)
{
if(CPRMMKBResponse == null)
return null;
if(CPRMMKBResponse == null) return null;
CPRMMediaKeyBlock response = CPRMMKBResponse.Value;
StringBuilder sb = new StringBuilder();
#if DEBUG
if(response.Reserved != 0)
sb.AppendFormat("Reserved = 0x{0:X2}", response.Reserved).AppendLine();
if(response.Reserved != 0) sb.AppendFormat("Reserved = 0x{0:X2}", response.Reserved).AppendLine();
#endif
sb.AppendFormat("Total number of CPRM Media Key Blocks available to transfer: {0}", response.TotalPacks).AppendLine();
sb.AppendFormat("Total number of CPRM Media Key Blocks available to transfer: {0}", response.TotalPacks)
.AppendLine();
sb.AppendFormat("CPRM Media Key Blocks in hex follows:");
sb.AppendLine(PrintHex.ByteArrayToHexArrayString(response.MKBPackData, 80));
@@ -121,5 +119,4 @@ namespace DiscImageChef.Decoders.SCSI.MMC
return PrettifyCPRMMediaKeyBlock(decoded);
}
}
}
}