[Aaru.CommonTypes] Introduced constants for module names

Introduces constant fields for respective debug module names, replacing the hardcoded ones.
This is done to standardize the naming convention, reduce redundancy and potentially avoid any typos or name mismatches across the project.
This change makes the code more maintainable and easier to update in case module names need to be changed.
This commit is contained in:
2023-10-03 17:00:22 +01:00
parent 0312d5a812
commit cf72e7b617
8 changed files with 307 additions and 301 deletions

View File

@@ -59,6 +59,8 @@ namespace Aaru.CommonTypes.Structs.Devices.ATA;
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
public static class Identify
{
const string MODULE_NAME = "ATA/ATAPI IDENTIFY decoder";
/// <summary>Capabilities flag bits.</summary>
[Flags]
public enum CapabilitiesBit : ushort
@@ -1007,7 +1009,7 @@ public static class Identify
if(IdentifyDeviceResponse.Length != 512)
{
AaruConsole.DebugWriteLine("ATA/ATAPI IDENTIFY decoder",
AaruConsole.DebugWriteLine(MODULE_NAME,
Localization.IDENTIFY_response_is_different_than_512_bytes_not_decoding);
return null;