You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Harmony/Tools/AccessTools.cs
+52-5Lines changed: 52 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@
8
8
usingSystem.Linq;
9
9
usingSystem.Reflection;
10
10
usingSystem.Reflection.Emit;
11
+
usingSystem.Text.RegularExpressions;
11
12
usingSystem.Threading;
12
13
#if NET45_OR_GREATER||NETSTANDARD||NETCOREAPP
13
14
usingSystem.Runtime.CompilerServices;
@@ -25,6 +26,8 @@ namespace HarmonyLib
25
26
///
26
27
publicstaticclassAccessTools
27
28
{
29
+
privatestaticType[]allTypesCached=null;
30
+
28
31
/// <summary>Shortcut for <see cref="BindingFlags"/> to simplify the use of reflections and make it work for any access level</summary>
29
32
///
30
33
publicstaticreadonlyBindingFlagsall=BindingFlags.Public// This should a be const, but changing from static (readonly) to const breaks binary compatibility.
@@ -51,13 +54,57 @@ public static class AccessTools
0 commit comments