mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2025-05-19 03:41:18 +03:00
Refactor: Move classes to separate files with one-liner namespace style
This commit is contained in:
parent
cf2d61915c
commit
53de948376
9
X86Disassembler/PE/DataDirectory.cs
Normal file
9
X86Disassembler/PE/DataDirectory.cs
Normal 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
|
||||
}
|
@ -27,26 +27,4 @@ namespace X86Disassembler.PE
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
23
X86Disassembler/PE/ExportedFunction.cs
Normal file
23
X86Disassembler/PE/ExportedFunction.cs
Normal 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;
|
||||
}
|
||||
}
|
@ -25,25 +25,4 @@ namespace X86Disassembler.PE
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
22
X86Disassembler/PE/ImportedFunction.cs
Normal file
22
X86Disassembler/PE/ImportedFunction.cs
Normal 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;
|
||||
}
|
||||
}
|
@ -70,13 +70,4 @@ namespace X86Disassembler.PE
|
||||
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
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user