Skip to content

Commit

Permalink
moves GetSortedPatchMethods to PatchProcessor
Browse files Browse the repository at this point in the history
  • Loading branch information
pardeike committed May 10, 2020
1 parent b455fdf commit fa4f98e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Harmony/Internal/PatchFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ internal static void RemovePatch(PatchInfo patchInfo, MethodInfo patch)
/// <param name="debug">Use debug mode</param>
/// <returns>The sorted patch methods</returns>
///
public static List<MethodInfo> GetSortedPatchMethods(MethodBase original, Patch[] patches, bool debug)
internal static List<MethodInfo> GetSortedPatchMethods(MethodBase original, Patch[] patches, bool debug)
{
return new PatchSorter(patches, debug).Sort(original);
}
Expand Down
10 changes: 10 additions & 0 deletions Harmony/Public/PatchProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,16 @@ public static Patches GetPatchInfo(MethodBase method)
return new Patches(patchInfo.prefixes, patchInfo.postfixes, patchInfo.transpilers, patchInfo.finalizers);
}

/// <summary>Sort patch methods by their priority rules</summary>
/// <param name="original">The original method</param>
/// <param name="patches">Patches to sort</param>
/// <returns>The sorted patch methods</returns>
///
public static List<MethodInfo> GetSortedPatchMethods(MethodBase original, Patch[] patches)
{
return PatchFunctions.GetSortedPatchMethods(original, patches, false);
}

/// <summary>Gets Harmony version for all active Harmony instances</summary>
/// <param name="currentVersion">[out] The current Harmony version</param>
/// <returns>A dictionary containing assembly version keyed by Harmony ID</returns>
Expand Down

0 comments on commit fa4f98e

Please sign in to comment.