[Aaru.Decoders] 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:21:19 +01:00
parent 3d72f0d7da
commit 2a52c3075d
15 changed files with 98 additions and 74 deletions

View File

@@ -55,6 +55,8 @@ namespace Aaru.Decoders.CD;
SuppressMessage("ReSharper", "MemberCanBePrivate.Global"), SuppressMessage("ReSharper", "NotAccessedField.Global")]
public static class CDTextOnLeadIn
{
const string MODULE_NAME = "CD-TEXT decoder";
public enum PackTypeIndicator : byte
{
/// <summary>Title of the track (or album if track == 0)</summary>
@@ -110,7 +112,7 @@ public static class CDTextOnLeadIn
if(decoded.DataLength + 2 != CDTextResponse.Length)
{
AaruConsole.DebugWriteLine("CD-TEXT decoder",
AaruConsole.DebugWriteLine(MODULE_NAME,
Localization.
Expected_CD_TEXT_size_0_bytes_is_not_received_size_1_bytes_not_decoding,
decoded.DataLength + 2, CDTextResponse.Length);