diff --git a/BepInEx.Harmony/BepInEx.Harmony.csproj b/BepInEx.Harmony/BepInEx.Harmony.csproj index 4114e4d..eaed9b6 100644 --- a/BepInEx.Harmony/BepInEx.Harmony.csproj +++ b/BepInEx.Harmony/BepInEx.Harmony.csproj @@ -42,6 +42,7 @@ + diff --git a/BepInEx.Harmony/HarmonyExtensions.cs b/BepInEx.Harmony/HarmonyExtensions.cs new file mode 100644 index 0000000..8e1cdf3 --- /dev/null +++ b/BepInEx.Harmony/HarmonyExtensions.cs @@ -0,0 +1,20 @@ +using System; + +namespace BepInEx.Harmony +{ + /// + /// An extension class for Harmony based operations. + /// + public static class HarmonyExtensions + { + /// + /// Applies all patches specified in the type. + /// + /// The HarmonyInstance to use. + /// The type to scan. + public static void PatchAll(this HarmonyLib.Harmony harmonyInstance, Type type) + { + HarmonyWrapper.PatchAll(type, harmonyInstance); + } + } +}