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

@ -15,6 +15,15 @@ namespace X86Disassembler.PE
public uint FirstThunk; // RVA to first thunk
public List<ImportedFunction> Functions { get; } = new List<ImportedFunction>();
/// <summary>
/// Initializes a new instance of the ImportDescriptor class
/// </summary>
public ImportDescriptor()
{
// Initialize string field to avoid nullability warning
DllName = string.Empty;
}
}
/// <summary>
@ -27,5 +36,14 @@ namespace X86Disassembler.PE
public bool IsOrdinal; // True if imported by ordinal
public ushort Ordinal; // Ordinal value (if imported by ordinal)
public uint ThunkRVA; // RVA of the thunk for this function
/// <summary>
/// Initializes a new instance of the ImportedFunction class
/// </summary>
public ImportedFunction()
{
// Initialize string field to avoid nullability warning
Name = string.Empty;
}
}
}