0
mirror of https://github.com/sampletext32/ParkanPlayground.git synced 2025-05-19 11:51:17 +03:00

Refactor: Move classes to separate files with one-liner namespace style

This commit is contained in:
bird_egop 2025-04-12 18:11:07 +03:00
parent cf2d61915c
commit 53de948376
6 changed files with 54 additions and 52 deletions

View File

@ -0,0 +1,9 @@
namespace X86Disassembler.PE;
/// <summary>
/// Represents a data directory in the optional header
/// </summary>
public class DataDirectory
{
public uint VirtualAddress; // RVA of the table
public uint Size; // Size of the table
}

View File

@ -27,26 +27,4 @@ namespace X86Disassembler.PE
DllName = string.Empty; DllName = string.Empty;
} }
} }
/// <summary>
/// Represents an exported function in a PE file
/// </summary>
public class ExportedFunction
{
public string Name; // Function name
public ushort Ordinal; // Function ordinal
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;
}
}
} }

View File

@ -0,0 +1,23 @@
namespace X86Disassembler.PE;
/// <summary>
/// Represents an exported function in a PE file
/// </summary>
public class ExportedFunction
{
public string Name; // Function name
public ushort Ordinal; // Function ordinal
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;
}
}

View File

@ -25,25 +25,4 @@ namespace X86Disassembler.PE
DllName = string.Empty; DllName = string.Empty;
} }
} }
/// <summary>
/// Represents an imported function in a PE file
/// </summary>
public class ImportedFunction
{
public string Name; // Function name
public ushort Hint; // Hint value
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;
}
}
} }

View File

@ -0,0 +1,22 @@
namespace X86Disassembler.PE;
/// <summary>
/// Represents an imported function in a PE file
/// </summary>
public class ImportedFunction
{
public string Name; // Function name
public ushort Hint; // Hint value
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;
}
}

View File

@ -70,13 +70,4 @@ namespace X86Disassembler.PE
return Magic == PE32PLUS_MAGIC; return Magic == PE32PLUS_MAGIC;
} }
} }
/// <summary>
/// Represents a data directory in the optional header
/// </summary>
public class DataDirectory
{
public uint VirtualAddress; // RVA of the table
public uint Size; // Size of the table
}
} }