General cleanup and refactor.

This commit is contained in:
2022-03-07 07:36:42 +00:00
parent 0deebadaa0
commit bd76adc35e
119 changed files with 1647 additions and 2151 deletions

View File

@@ -30,12 +30,12 @@
// Copyright © 2011-2022 Natalia Portillo
// ****************************************************************************/
namespace Aaru.Decoders.MMC;
using System;
using System.Diagnostics.CodeAnalysis;
using System.Text;
namespace Aaru.Decoders.MMC;
[SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"),
SuppressMessage("ReSharper", "MemberCanBePrivate.Global"), SuppressMessage("ReSharper", "NotAccessedField.Global")]
public class CSD
@@ -84,7 +84,7 @@ public static partial class Decoders
if(response?.Length != 4)
return null;
byte[] data = new byte[16];
var data = new byte[16];
byte[] tmp = BitConverter.GetBytes(response[0]);
Array.Copy(tmp, 0, data, 0, 4);
@@ -148,7 +148,7 @@ public static partial class Decoders
double unitFactor = 0;
double multiplier = 0;
string unit = "";
var unit = "";
var sb = new StringBuilder();
sb.AppendLine("MultiMediaCard Device Specific Data Register:");
@@ -609,8 +609,7 @@ public static partial class Decoders
break;
}
sb.AppendFormat("\tWriting is {0} times slower than reading", Math.Pow(2, csd.WriteSpeedFactor)).
AppendLine();
sb.AppendFormat("\tWriting is {0} times slower than reading", Math.Pow(2, csd.WriteSpeedFactor)).AppendLine();
if(csd.WriteBlockLength == 15)
sb.AppendLine("\tWrite block length size is defined in extended CSD");