Skip to content

Commit 0866463

Browse files
committed
Move Patches type to the Patches.cs.
1 parent ada10ef commit 0866463

File tree

2 files changed

+19
-17
lines changed

2 files changed

+19
-17
lines changed

Entrypoint.cs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
using System;
2-
using System.Security.Policy;
3-
4-
namespace Doorstop;
1+
namespace Doorstop;
52

63
public static class Entrypoint
74
{
@@ -14,17 +11,4 @@ public static void Start()
1411
Harmony = new(nameof(Doorstop));
1512
Harmony.PatchAll();
1613
}
17-
}
18-
[Harmony]
19-
public static class Patches
20-
{
21-
[HarmonyPatch(typeof(AppDomain), nameof(Load), new[] { typeof(byte[]), typeof(byte[]), typeof(Evidence), typeof(bool) }), HarmonyPrefix]
22-
public static void Load(ref byte[] rawAssembly, ref byte[] rawSymbolStore)
23-
{
24-
try
25-
{
26-
rawSymbolStore = Pdb2Mdb.Converter.Convert(rawAssembly, rawSymbolStore);
27-
}
28-
catch { }
29-
}
3014
}

Patches.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System;
2+
using System.Security.Policy;
3+
4+
namespace Doorstop;
5+
6+
[Harmony]
7+
public static partial class Patches
8+
{
9+
[HarmonyPatch(typeof(AppDomain), nameof(Load), new[] { typeof(byte[]), typeof(byte[]), typeof(Evidence), typeof(bool) }), HarmonyPrefix]
10+
public static void Load(ref byte[] rawAssembly, ref byte[] rawSymbolStore)
11+
{
12+
try
13+
{
14+
rawSymbolStore = Pdb2Mdb.Converter.Convert(rawAssembly, rawSymbolStore);
15+
}
16+
catch { }
17+
}
18+
}

0 commit comments

Comments
 (0)