0
mirror of https://github.com/sampletext32/ParkanPlayground.git synced 2025-06-20 00:18:02 +03:00

Fix nullability warnings by initializing fields in constructors

This commit is contained in:
bird_egop
2025-04-12 18:05:31 +03:00
parent 79773b08aa
commit cf2d61915c
7 changed files with 86 additions and 3 deletions

View File

@ -17,6 +17,15 @@ namespace X86Disassembler.PE
public uint AddressOfFunctions; // RVA of the export address table
public uint AddressOfNames; // RVA of the export names table
public uint AddressOfNameOrdinals; // RVA of the ordinal table
/// <summary>
/// Initializes a new instance of the ExportDirectory class
/// </summary>
public ExportDirectory()
{
// Initialize string field to avoid nullability warning
DllName = string.Empty;
}
}
/// <summary>
@ -29,5 +38,15 @@ namespace X86Disassembler.PE
public uint Address; // Function RVA
public bool IsForwarder; // True if this is a forwarder
public string ForwarderName; // Name of the forwarded function
/// <summary>
/// Initializes a new instance of the ExportedFunction class
/// </summary>
public ExportedFunction()
{
// Initialize string fields to avoid nullability warnings
Name = string.Empty;
ForwarderName = string.Empty;
}
}
}