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