mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2025-06-19 07:59:47 +03:00
Update code style to follow project rules with one-liner namespace declarations
This commit is contained in:
@ -1,7 +1,5 @@
|
||||
using System;
|
||||
namespace X86Disassembler.PE;
|
||||
|
||||
namespace X86Disassembler.PE
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the DOS header of a PE file
|
||||
/// </summary>
|
||||
@ -37,4 +35,3 @@ namespace X86Disassembler.PE
|
||||
e_res2 = new ushort[10];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
namespace X86Disassembler.PE
|
||||
{
|
||||
namespace X86Disassembler.PE;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the Export Directory of a PE file
|
||||
/// </summary>
|
||||
@ -27,4 +27,3 @@ namespace X86Disassembler.PE
|
||||
DllName = string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
namespace X86Disassembler.PE
|
||||
{
|
||||
namespace X86Disassembler.PE;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the File header of a PE file
|
||||
/// </summary>
|
||||
@ -13,4 +13,3 @@ namespace X86Disassembler.PE
|
||||
public ushort SizeOfOptionalHeader; // Size of optional header
|
||||
public ushort Characteristics; // Characteristics
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
namespace X86Disassembler.PE;
|
||||
|
||||
namespace X86Disassembler.PE
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents an Import Descriptor in a PE file
|
||||
/// </summary>
|
||||
@ -25,4 +23,3 @@ namespace X86Disassembler.PE
|
||||
DllName = string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
namespace X86Disassembler.PE
|
||||
{
|
||||
namespace X86Disassembler.PE;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the Optional header of a PE file
|
||||
/// </summary>
|
||||
@ -70,4 +70,3 @@ namespace X86Disassembler.PE
|
||||
return Magic == PE32PLUS_MAGIC;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using X86Disassembler.PE.Parsers;
|
||||
|
||||
namespace X86Disassembler.PE
|
||||
{
|
||||
namespace X86Disassembler.PE;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a Portable Executable (PE) file format parser
|
||||
/// </summary>
|
||||
@ -233,4 +229,3 @@ namespace X86Disassembler.PE
|
||||
return section.ContainsCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
namespace X86Disassembler.PE;
|
||||
|
||||
namespace X86Disassembler.PE
|
||||
{
|
||||
/// <summary>
|
||||
/// Utility class for PE format operations
|
||||
/// </summary>
|
||||
@ -59,4 +56,3 @@ namespace X86Disassembler.PE
|
||||
throw new ArgumentException($"RVA {rva:X8} is not within any section");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,5 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
namespace X86Disassembler.PE.Parsers;
|
||||
|
||||
namespace X86Disassembler.PE.Parsers
|
||||
{
|
||||
/// <summary>
|
||||
/// Parser for the DOS header of a PE file
|
||||
/// </summary>
|
||||
@ -60,4 +57,3 @@ namespace X86Disassembler.PE.Parsers
|
||||
return header;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace X86Disassembler.PE.Parsers
|
||||
{
|
||||
namespace X86Disassembler.PE.Parsers;
|
||||
|
||||
/// <summary>
|
||||
/// Parser for the Export Directory of a PE file
|
||||
/// </summary>
|
||||
@ -173,4 +170,3 @@ namespace X86Disassembler.PE.Parsers
|
||||
return exportedFunctions;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,5 @@
|
||||
using System.IO;
|
||||
namespace X86Disassembler.PE.Parsers;
|
||||
|
||||
namespace X86Disassembler.PE.Parsers
|
||||
{
|
||||
/// <summary>
|
||||
/// Parser for the File header of a PE file
|
||||
/// </summary>
|
||||
@ -27,4 +25,3 @@ namespace X86Disassembler.PE.Parsers
|
||||
return header;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +1,10 @@
|
||||
using System.IO;
|
||||
namespace X86Disassembler.PE.Parsers;
|
||||
|
||||
namespace X86Disassembler.PE.Parsers
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface for PE format component parsers
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of component to parse</typeparam>
|
||||
public interface IParser<T>
|
||||
public interface IParser<out T>
|
||||
{
|
||||
/// <summary>
|
||||
/// Parse a component from the binary reader
|
||||
@ -15,4 +13,3 @@ namespace X86Disassembler.PE.Parsers
|
||||
/// <returns>The parsed component</returns>
|
||||
T Parse(BinaryReader reader);
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace X86Disassembler.PE.Parsers
|
||||
{
|
||||
namespace X86Disassembler.PE.Parsers;
|
||||
|
||||
/// <summary>
|
||||
/// Parser for Import Descriptors in a PE file
|
||||
/// </summary>
|
||||
@ -189,4 +186,3 @@ namespace X86Disassembler.PE.Parsers
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,5 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
namespace X86Disassembler.PE.Parsers;
|
||||
|
||||
namespace X86Disassembler.PE.Parsers
|
||||
{
|
||||
/// <summary>
|
||||
/// Parser for the Optional header of a PE file
|
||||
/// </summary>
|
||||
@ -111,4 +108,3 @@ namespace X86Disassembler.PE.Parsers
|
||||
return header.Magic == PE32PLUS_MAGIC;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,7 @@
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace X86Disassembler.PE.Parsers
|
||||
{
|
||||
namespace X86Disassembler.PE.Parsers;
|
||||
|
||||
/// <summary>
|
||||
/// Parser for section headers in a PE file
|
||||
/// </summary>
|
||||
@ -35,4 +34,3 @@ namespace X86Disassembler.PE.Parsers
|
||||
return header;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
namespace X86Disassembler.PE
|
||||
{
|
||||
namespace X86Disassembler.PE;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a section header in a PE file
|
||||
/// </summary>
|
||||
@ -68,4 +68,3 @@ namespace X86Disassembler.PE
|
||||
return (Characteristics & IMAGE_SCN_MEM_EXECUTE) != 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,7 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using X86Disassembler.PE;
|
||||
|
||||
namespace X86Disassembler
|
||||
{
|
||||
namespace X86Disassembler;
|
||||
|
||||
internal class Program
|
||||
{
|
||||
// Path to the DLL file to disassemble
|
||||
@ -145,4 +143,3 @@ namespace X86Disassembler
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user