refactor(Injector): switch to file-scoped namespaces

This commit is contained in:
goat 2021-11-17 19:46:33 +01:00
parent b5f34c3199
commit f30ebe5166
No known key found for this signature in database
GPG key ID: 7773BB5B43BA52E5
3 changed files with 1288 additions and 1291 deletions

View file

@ -16,13 +16,13 @@ using Serilog.Events;
using static Dalamud.Injector.NativeFunctions;
namespace Dalamud.Injector
namespace Dalamud.Injector;
/// <summary>
/// Entrypoint to the program.
/// </summary>
public sealed class EntryPoint
{
/// <summary>
/// Entrypoint to the program.
/// </summary>
public sealed class EntryPoint
{
/// <summary>
/// A delegate used during initialization of the CLR from Dalamud.Injector.Boot.
/// </summary>
@ -318,5 +318,4 @@ namespace Dalamud.Injector
Log.Information("Done");
}
}
}

View file

@ -16,15 +16,15 @@ using Serilog;
using static Dalamud.Injector.NativeFunctions;
using static Iced.Intel.AssemblerRegisters;
namespace Dalamud.Injector
namespace Dalamud.Injector;
/// <summary>
/// This class implements injecting into a remote process. It is a highly stripped down version of the
/// https://github.com/Reloaded-Project injector/assembler implementation due to issues with Lutris and
/// Wine.
/// </summary>
internal sealed class Injector : IDisposable
{
/// <summary>
/// This class implements injecting into a remote process. It is a highly stripped down version of the
/// https://github.com/Reloaded-Project injector/assembler implementation due to issues with Lutris and
/// Wine.
/// </summary>
internal sealed class Injector : IDisposable
{
private readonly Process targetProcess;
private readonly ExternalMemory extMemory;
private readonly CircularBuffer circularBuffer;
@ -355,5 +355,4 @@ namespace Dalamud.Injector
public long LPProcName { get; set; }
}
}
}

View file

@ -1,13 +1,13 @@
using System;
using System.Runtime.InteropServices;
namespace Dalamud.Injector
namespace Dalamud.Injector;
/// <summary>
/// Native user32 functions.
/// </summary>
internal static partial class NativeFunctions
{
/// <summary>
/// Native user32 functions.
/// </summary>
internal static partial class NativeFunctions
{
/// <summary>
/// MB_* from winuser.
/// </summary>
@ -223,13 +223,13 @@ namespace Dalamud.Injector
/// </returns>
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
public static extern int MessageBoxW(IntPtr hWnd, string text, string caption, MessageBoxType type);
}
}
/// <summary>
/// Native kernel32 functions.
/// </summary>
internal static partial class NativeFunctions
{
/// <summary>
/// Native kernel32 functions.
/// </summary>
internal static partial class NativeFunctions
{
/// <summary>
/// MEM_* from memoryapi.
/// </summary>
@ -833,5 +833,4 @@ namespace Dalamud.Injector
byte[] lpBuffer,
int dwSize,
out IntPtr lpNumberOfBytesWritten);
}
}