Skip to content

Commit

Permalink
HarmonyExtensions
Browse files Browse the repository at this point in the history
  • Loading branch information
Keelhauled committed Jul 3, 2019
1 parent e312b4d commit a71acb2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions BepInEx.Harmony/BepInEx.Harmony.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<ItemGroup>
<Compile Include="Attributes.cs" />
<Compile Include="EmitDelegate.cs" />
<Compile Include="HarmonyExtensions.cs" />
<Compile Include="HarmonyWrapper.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
Expand Down
20 changes: 20 additions & 0 deletions BepInEx.Harmony/HarmonyExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;

namespace BepInEx.Harmony
{
/// <summary>
/// An extension class for Harmony based operations.
/// </summary>
public static class HarmonyExtensions
{
/// <summary>
/// Applies all patches specified in the type.
/// </summary>
/// <param name="harmonyInstance">The HarmonyInstance to use.</param>
/// <param name="type">The type to scan.</param>
public static void PatchAll(this HarmonyLib.Harmony harmonyInstance, Type type)
{
HarmonyWrapper.PatchAll(type, harmonyInstance);
}
}
}

0 comments on commit a71acb2

Please sign in to comment.