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

@@ -40,13 +40,10 @@ namespace DiscImageChef.Core.Devices.Report
{
public static void Report(Device dev, ref DeviceReport report, bool debug, ref bool removable)
{
if(report == null)
return;
if(report == null) return;
if(dev.Type == DeviceType.MMC)
report.MultiMediaCard = new mmcsdType();
else if(dev.Type == DeviceType.SecureDigital)
report.SecureDigital = new mmcsdType();
if(dev.Type == DeviceType.MMC) report.MultiMediaCard = new mmcsdType();
else if(dev.Type == DeviceType.SecureDigital) report.SecureDigital = new mmcsdType();
DicConsole.WriteLine("Trying to get CID...");
bool sense = dev.ReadCID(out byte[] cid, out uint[] response, dev.Timeout, out double duration);
@@ -77,8 +74,7 @@ namespace DiscImageChef.Core.Devices.Report
report.MultiMediaCard.CID = cid;
}
}
else
DicConsole.WriteLine("Could not read CID...");
else DicConsole.WriteLine("Could not read CID...");
DicConsole.WriteLine("Trying to get CSD...");
sense = dev.ReadCSD(out byte[] csd, out response, dev.Timeout, out duration);
@@ -87,13 +83,10 @@ namespace DiscImageChef.Core.Devices.Report
{
DicConsole.WriteLine("CSD obtained correctly...");
if(dev.Type == DeviceType.MMC)
report.MultiMediaCard.CSD = csd;
else if(dev.Type == DeviceType.SecureDigital)
report.SecureDigital.CSD = csd;
if(dev.Type == DeviceType.MMC) report.MultiMediaCard.CSD = csd;
else if(dev.Type == DeviceType.SecureDigital) report.SecureDigital.CSD = csd;
}
else
DicConsole.WriteLine("Could not read CSD...");
else DicConsole.WriteLine("Could not read CSD...");
if(dev.Type == DeviceType.MMC)
{
@@ -105,8 +98,7 @@ namespace DiscImageChef.Core.Devices.Report
DicConsole.WriteLine("OCR obtained correctly...");
report.MultiMediaCard.OCR = ocr;
}
else
DicConsole.WriteLine("Could not read OCR...");
else DicConsole.WriteLine("Could not read OCR...");
DicConsole.WriteLine("Trying to get Extended CSD...");
sense = dev.ReadExtendedCSD(out byte[] ecsd, out response, dev.Timeout, out duration);
@@ -116,8 +108,7 @@ namespace DiscImageChef.Core.Devices.Report
DicConsole.WriteLine("Extended CSD obtained correctly...");
report.MultiMediaCard.ExtendedCSD = ecsd;
}
else
DicConsole.WriteLine("Could not read Extended CSD...");
else DicConsole.WriteLine("Could not read Extended CSD...");
}
else if(dev.Type == DeviceType.SecureDigital)
{
@@ -129,8 +120,7 @@ namespace DiscImageChef.Core.Devices.Report
DicConsole.WriteLine("OCR obtained correctly...");
report.SecureDigital.OCR = ocr;
}
else
DicConsole.WriteLine("Could not read OCR...");
else DicConsole.WriteLine("Could not read OCR...");
DicConsole.WriteLine("Trying to get SCR...");
sense = dev.ReadSCR(out byte[] scr, out response, dev.Timeout, out duration);
@@ -140,10 +130,8 @@ namespace DiscImageChef.Core.Devices.Report
DicConsole.WriteLine("SCR obtained correctly...");
report.SecureDigital.SCR = scr;
}
else
DicConsole.WriteLine("Could not read SCR...");
else DicConsole.WriteLine("Could not read SCR...");
}
}
}
}
}