Redo Reformat and cleanup.

Rider EAP was having a bug interpreting .editorconfig that didn't generate the code style as we wanted.
This is now done with Rider-stable.
This commit is contained in:
2023-10-04 17:34:40 +01:00
parent bc8bf7a2dc
commit 7363a5d9c5
453 changed files with 7241 additions and 7126 deletions

View File

@@ -144,10 +144,7 @@ public partial class Device
if(sense)
return true;
if(buffer[0] != 0xA5 ||
buffer[1] != 0x5A ||
buffer[2] != 0x5A ||
buffer[3] != 0xA5)
if(buffer[0] != 0xA5 || buffer[1] != 0x5A || buffer[2] != 0x5A || buffer[3] != 0xA5)
return true;
for(var i = 4; i < 26; i += 2)

View File

@@ -683,11 +683,10 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine(SCSI_MODULE_NAME,
Localization.READ_READ_SUB_CHANNEL_MCN_Sense_1_Last_Error_2_took_0_ms,
duration, sense, LastError);
Localization.READ_READ_SUB_CHANNEL_MCN_Sense_1_Last_Error_2_took_0_ms, duration,
sense, LastError);
if(!sense &&
(buffer[8] & 0x80) == 0x80)
if(!sense && (buffer[8] & 0x80) == 0x80)
mcn = Encoding.ASCII.GetString(buffer, 9, 13);
return sense;
@@ -729,8 +728,7 @@ public partial class Device
READ_READ_SUB_CHANNEL_ISRC_Track_Number_1_Sense_2_Last_Error_3_took_0_ms,
duration, trackNumber, sense, LastError);
if(!sense &&
(buffer[8] & 0x80) == 0x80)
if(!sense && (buffer[8] & 0x80) == 0x80)
isrc = Encoding.ASCII.GetString(buffer, 9, 12);
return sense;

View File

@@ -90,8 +90,7 @@ public partial class Device
cdb[4] = (byte)((lba & 0xFF00) >> 8);
cdb[5] = (byte)(lba & 0xFF);
if(requested > 0 ||
scanLength > 1)
if(requested > 0 || scanLength > 1)
{
buffer = new byte[8];
buffer[0] = (byte)((requested & 0xFF000000) >> 24);

View File

@@ -74,7 +74,10 @@ public partial class Device
buffer = new byte[36];
senseBuffer = new byte[64];
byte[] cdb = { (byte)ScsiCommands.Inquiry, 0, 0, 0, 36, 0 };
byte[] cdb =
{
(byte)ScsiCommands.Inquiry, 0, 0, 0, 36, 0
};
LastError = SendScsiCommand(cdb, ref buffer, out senseBuffer, timeout, ScsiDirection.In, out duration,
out bool sense);
@@ -86,7 +89,10 @@ public partial class Device
var pagesLength = (byte)(buffer[4] + 5);
cdb = new byte[] { (byte)ScsiCommands.Inquiry, 0, 0, 0, pagesLength, 0 };
cdb = new byte[]
{
(byte)ScsiCommands.Inquiry, 0, 0, 0, pagesLength, 0
};
buffer = new byte[pagesLength];
senseBuffer = new byte[64];
@@ -145,7 +151,10 @@ public partial class Device
buffer = new byte[36];
senseBuffer = new byte[64];
byte[] cdb = { (byte)ScsiCommands.Inquiry, 1, page, 0, 36, 0 };
byte[] cdb =
{
(byte)ScsiCommands.Inquiry, 1, page, 0, 36, 0
};
LastError = SendScsiCommand(cdb, ref buffer, out senseBuffer, timeout, ScsiDirection.In, out duration,
out bool sense);
@@ -161,7 +170,10 @@ public partial class Device
var pagesLength = (byte)(buffer[3] + 4);
cdb = new byte[] { (byte)ScsiCommands.Inquiry, 1, page, 0, pagesLength, 0 };
cdb = new byte[]
{
(byte)ScsiCommands.Inquiry, 1, page, 0, pagesLength, 0
};
buffer = new byte[pagesLength];
senseBuffer = new byte[64];
@@ -185,7 +197,10 @@ public partial class Device
{
senseBuffer = new byte[64];
byte[] cdb = { (byte)ScsiCommands.TestUnitReady, 0, 0, 0, 0, 0 };
byte[] cdb =
{
(byte)ScsiCommands.TestUnitReady, 0, 0, 0, 0, 0
};
byte[] buffer = Array.Empty<byte>();

View File

@@ -376,7 +376,8 @@ public partial class Device
/// <param name="duration">Duration.</param>
public bool Read16(out byte[] buffer, out byte[] senseBuffer, ulong objectId, uint blocks, uint blockSize,
uint timeout, out double duration) => Read16(out buffer, out senseBuffer, false, true, 0,
objectId, blocks, blockSize, timeout, out duration);
objectId, blocks, blockSize, timeout,
out duration);
/// <summary>Reads a number of fixed-length blocks starting at specified block from the specified partition</summary>
/// <param name="buffer">Buffer.</param>

View File

@@ -91,8 +91,7 @@ public partial class Device
if(readLong)
cdb[5] += 0x40;
if(!inhibitDma &&
!readLong)
if(!inhibitDma && !readLong)
buffer = transferLength == 0 ? new byte[256 * blockSize] : new byte[transferLength * blockSize];
else if(readLong)
{
@@ -172,8 +171,7 @@ public partial class Device
if(readLong)
cdb[9] += 0x40;
if(!inhibitDma &&
!readLong)
if(!inhibitDma && !readLong)
buffer = new byte[transferLength * blockSize];
else if(readLong)
{