mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
REFACTOR: All refactor in DiscImageChef.Tests.Devices.
This commit is contained in:
@@ -77,13 +77,13 @@ namespace DiscImageChef.Tests.Devices.SecureDigital
|
||||
Status(devPath, dev);
|
||||
continue;
|
||||
case 5:
|
||||
SendCID(devPath, dev);
|
||||
SendCid(devPath, dev);
|
||||
continue;
|
||||
case 6:
|
||||
SendCSD(devPath, dev);
|
||||
SendCsd(devPath, dev);
|
||||
continue;
|
||||
case 7:
|
||||
SendSCR(devPath, dev);
|
||||
SendScr(devPath, dev);
|
||||
continue;
|
||||
case 8:
|
||||
SetBlockLength(devPath, dev);
|
||||
@@ -191,9 +191,9 @@ namespace DiscImageChef.Tests.Devices.SecureDigital
|
||||
DicConsole.WriteLine("Sending READ_{0}_BLOCK to the device:", multiple ? "MULTIPLE" : "SINGLE");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer == null ? "null" : buffer.Length.ToString());
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Response has {0} elements.", response == null ? "null" : response.Length.ToString());
|
||||
DicConsole.WriteLine("Response has {0} elements.", response?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Print buffer.");
|
||||
@@ -264,9 +264,9 @@ namespace DiscImageChef.Tests.Devices.SecureDigital
|
||||
DicConsole.WriteLine("Sending SD_SEND_OP_COND to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer == null ? "null" : buffer.Length.ToString());
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Response has {0} elements.", response == null ? "null" : response.Length.ToString());
|
||||
DicConsole.WriteLine("Response has {0} elements.", response?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Print buffer.");
|
||||
@@ -346,9 +346,9 @@ namespace DiscImageChef.Tests.Devices.SecureDigital
|
||||
DicConsole.WriteLine("Sending SD_STATUS to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer == null ? "null" : buffer.Length.ToString());
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Response has {0} elements.", response == null ? "null" : response.Length.ToString());
|
||||
DicConsole.WriteLine("Response has {0} elements.", response?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Print buffer.");
|
||||
@@ -406,7 +406,7 @@ namespace DiscImageChef.Tests.Devices.SecureDigital
|
||||
}
|
||||
}
|
||||
|
||||
static void SendCID(string devPath, Device dev)
|
||||
static void SendCid(string devPath, Device dev)
|
||||
{
|
||||
start:
|
||||
System.Console.Clear();
|
||||
@@ -417,9 +417,9 @@ namespace DiscImageChef.Tests.Devices.SecureDigital
|
||||
DicConsole.WriteLine("Sending SEND_CID to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer == null ? "null" : buffer.Length.ToString());
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Response has {0} elements.", response == null ? "null" : response.Length.ToString());
|
||||
DicConsole.WriteLine("Response has {0} elements.", response?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Print buffer.");
|
||||
@@ -488,7 +488,7 @@ namespace DiscImageChef.Tests.Devices.SecureDigital
|
||||
}
|
||||
}
|
||||
|
||||
static void SendCSD(string devPath, Device dev)
|
||||
static void SendCsd(string devPath, Device dev)
|
||||
{
|
||||
start:
|
||||
System.Console.Clear();
|
||||
@@ -499,9 +499,9 @@ namespace DiscImageChef.Tests.Devices.SecureDigital
|
||||
DicConsole.WriteLine("Sending SEND_CSD to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer == null ? "null" : buffer.Length.ToString());
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Response has {0} elements.", response == null ? "null" : response.Length.ToString());
|
||||
DicConsole.WriteLine("Response has {0} elements.", response?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Print buffer.");
|
||||
@@ -570,7 +570,7 @@ namespace DiscImageChef.Tests.Devices.SecureDigital
|
||||
}
|
||||
}
|
||||
|
||||
static void SendSCR(string devPath, Device dev)
|
||||
static void SendScr(string devPath, Device dev)
|
||||
{
|
||||
start:
|
||||
System.Console.Clear();
|
||||
@@ -581,9 +581,9 @@ namespace DiscImageChef.Tests.Devices.SecureDigital
|
||||
DicConsole.WriteLine("Sending SEND_SCR to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer == null ? "null" : buffer.Length.ToString());
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Response has {0} elements.", response == null ? "null" : response.Length.ToString());
|
||||
DicConsole.WriteLine("Response has {0} elements.", response?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Print buffer.");
|
||||
@@ -708,7 +708,7 @@ namespace DiscImageChef.Tests.Devices.SecureDigital
|
||||
DicConsole.WriteLine("Sending SET_BLOCKLEN to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Response has {0} elements.", response == null ? "null" : response.Length.ToString());
|
||||
DicConsole.WriteLine("Response has {0} elements.", response?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("SET_BLOCKLEN response:");
|
||||
if(response != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user