summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/Patching/PatchHelper.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-08-01 13:11:51 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-08-01 13:11:51 -0400
commit5b31be76dd90711ff475341de8dfdb6e1f50b98a (patch)
treee120bc62af72e94e8e924ba124382d0c6f9304de /src/SMAPI/Framework/Patching/PatchHelper.cs
parent8f96a97f070d654764de3b138678d8f62707f485 (diff)
parentd688cdf8c3c852d4b11cdd046d67c4b35443cc95 (diff)
downloadSMAPI-5b31be76dd90711ff475341de8dfdb6e1f50b98a.tar.gz
SMAPI-5b31be76dd90711ff475341de8dfdb6e1f50b98a.tar.bz2
SMAPI-5b31be76dd90711ff475341de8dfdb6e1f50b98a.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/Framework/Patching/PatchHelper.cs')
-rw-r--r--src/SMAPI/Framework/Patching/PatchHelper.cs36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/SMAPI/Framework/Patching/PatchHelper.cs b/src/SMAPI/Framework/Patching/PatchHelper.cs
deleted file mode 100644
index d1aa0185..00000000
--- a/src/SMAPI/Framework/Patching/PatchHelper.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-#if !HARMONY_2
-using System;
-using System.Collections.Generic;
-
-namespace StardewModdingAPI.Framework.Patching
-{
- /// <summary>Provides generic methods for implementing Harmony patches.</summary>
- internal class PatchHelper
- {
- /*********
- ** Fields
- *********/
- /// <summary>The interception keys currently being intercepted.</summary>
- private static readonly HashSet<string> InterceptingKeys = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
-
-
- /*********
- ** Public methods
- *********/
- /// <summary>Track a method that will be intercepted.</summary>
- /// <param name="key">The intercept key.</param>
- /// <returns>Returns false if the method was already marked for interception, else true.</returns>
- public static bool StartIntercept(string key)
- {
- return PatchHelper.InterceptingKeys.Add(key);
- }
-
- /// <summary>Track a method as no longer being intercepted.</summary>
- /// <param name="key">The intercept key.</param>
- public static void StopIntercept(string key)
- {
- PatchHelper.InterceptingKeys.Remove(key);
- }
- }
-}
-#endif