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

@@ -50,11 +50,9 @@ namespace DiscImageChef.Decoders.SecureDigital
{
public static CID DecodeCID(uint[] response)
{
if(response == null)
return null;
if(response == null) return null;
if(response.Length != 4)
return null;
if(response.Length != 4) return null;
byte[] data = new byte[16];
byte[] tmp = new byte[4];
@@ -73,11 +71,9 @@ namespace DiscImageChef.Decoders.SecureDigital
public static CID DecodeCID(byte[] response)
{
if(response == null)
return null;
if(response == null) return null;
if(response.Length != 16)
return null;
if(response.Length != 16) return null;
byte[] tmp;
@@ -99,8 +95,7 @@ namespace DiscImageChef.Decoders.SecureDigital
public static string PrettifyCID(CID cid)
{
if(cid == null)
return null;
if(cid == null) return null;
StringBuilder sb = new StringBuilder();
@@ -108,9 +103,11 @@ namespace DiscImageChef.Decoders.SecureDigital
sb.AppendFormat("\tManufacturer: {0}", VendorString.Prettify(cid.Manufacturer)).AppendLine();
sb.AppendFormat("\tApplication ID: {0}", cid.ApplicationID).AppendLine();
sb.AppendFormat("\tProduct name: {0}", cid.ProductName).AppendLine();
sb.AppendFormat("\tProduct revision: {0:X2}.{1:X2}", (cid.ProductRevision & 0xF0) >> 4, cid.ProductRevision & 0x0F).AppendLine();
sb.AppendFormat("\tProduct revision: {0:X2}.{1:X2}", (cid.ProductRevision & 0xF0) >> 4,
cid.ProductRevision & 0x0F).AppendLine();
sb.AppendFormat("\tProduct serial number: {0}", cid.ProductSerialNumber).AppendLine();
sb.AppendFormat("\tDevice manufactured month {0} of {1}", (cid.ManufacturingDate & 0xF00) >> 8, (cid.ManufacturingDate & 0xFF) + 2000).AppendLine();
sb.AppendFormat("\tDevice manufactured month {0} of {1}", (cid.ManufacturingDate & 0xF00) >> 8,
(cid.ManufacturingDate & 0xFF) + 2000).AppendLine();
sb.AppendFormat("\tCID CRC: 0x{0:X2}", cid.CRC).AppendLine();
return sb.ToString();
@@ -126,4 +123,4 @@ namespace DiscImageChef.Decoders.SecureDigital
return PrettifyCID(DecodeCID(response));
}
}
}
}