mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
REFACTOR: All refactor in DiscImageChef.Tests.Devices.
This commit is contained in:
@@ -183,10 +183,10 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("Sending READ {0}(6) to the device:", readlong ? "LONG " : "");
|
||||
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("Sense buffer is {0} bytes.",
|
||||
senseBuffer == null ? "null" : senseBuffer.Length.ToString());
|
||||
senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -345,10 +345,10 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("Sending READ {0}(10) to the device:", readlong ? "LONG " : "");
|
||||
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("Sense buffer is {0} bytes.",
|
||||
senseBuffer == null ? "null" : senseBuffer.Length.ToString());
|
||||
senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -416,9 +416,6 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void ReadResetUsageCounter(string devPath, Device dev)
|
||||
{
|
||||
string strDev;
|
||||
int item;
|
||||
|
||||
start:
|
||||
System.Console.Clear();
|
||||
bool sense =
|
||||
@@ -430,10 +427,10 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("Sending READ/RESET USAGE COUNTER 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("Sense buffer is {0} bytes.",
|
||||
senseBuffer == null ? "null" : senseBuffer.Length.ToString());
|
||||
senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -444,8 +441,8 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("0.- Return to SyQuest vendor commands menu.");
|
||||
DicConsole.Write("Choose: ");
|
||||
|
||||
strDev = System.Console.ReadLine();
|
||||
if(!int.TryParse(strDev, out item))
|
||||
string strDev = System.Console.ReadLine();
|
||||
if(!int.TryParse(strDev, out int item))
|
||||
{
|
||||
DicConsole.WriteLine("Not a number. Press any key to continue...");
|
||||
System.Console.ReadKey();
|
||||
|
||||
Reference in New Issue
Block a user