diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-03-12 18:25:29 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-03-12 18:25:29 -0400 |
commit | ccc57935de9b75e17b9f531df87e2ac4dac43dfc (patch) | |
tree | 907ba213250089a2833939822950ace659e56fce /src/StardewModdingAPI.AssemblyRewriters/Finders/SMAPI_Extensions_MethodFinder.cs | |
parent | a6ed67a9f763b5efab58589776e8eaa31a4f2dbc (diff) | |
download | SMAPI-ccc57935de9b75e17b9f531df87e2ac4dac43dfc.tar.gz SMAPI-ccc57935de9b75e17b9f531df87e2ac4dac43dfc.tar.bz2 SMAPI-ccc57935de9b75e17b9f531df87e2ac4dac43dfc.zip |
replace individual instruction finders with generic implementations (#247)
Diffstat (limited to 'src/StardewModdingAPI.AssemblyRewriters/Finders/SMAPI_Extensions_MethodFinder.cs')
-rw-r--r-- | src/StardewModdingAPI.AssemblyRewriters/Finders/SMAPI_Extensions_MethodFinder.cs | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/StardewModdingAPI.AssemblyRewriters/Finders/SMAPI_Extensions_MethodFinder.cs b/src/StardewModdingAPI.AssemblyRewriters/Finders/SMAPI_Extensions_MethodFinder.cs deleted file mode 100644 index 4abcbc13..00000000 --- a/src/StardewModdingAPI.AssemblyRewriters/Finders/SMAPI_Extensions_MethodFinder.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Diagnostics.CodeAnalysis; -using Mono.Cecil; -using Mono.Cecil.Cil; -using StardewModdingAPI.AssemblyRewriters.Framework; - -namespace StardewModdingAPI.AssemblyRewriters.Finders -{ - /// <summary>Finds CIL instructions that reference the former <c>StardewModdingAPI.Extensions</c> class, which was removed in SMAPI 1.9.</summary> - [SuppressMessage("ReSharper", "InconsistentNaming", Justification = "This class is not meant to be used directly, and is deliberately named to make it easier to know what it changes at a glance.")] - public class SMAPI_Extensions_MethodFinder : BaseMethodFinder - { - /********* - ** Accessors - *********/ - /// <summary>A brief noun phrase indicating what the instruction finder matches.</summary> - public override string NounPhrase { get; } = "obsolete StardewModdingAPI.Extensions API"; - - - /********* - ** Protected methods - *********/ - /// <summary>Get whether a method reference should be rewritten.</summary> - /// <param name="instruction">The IL instruction.</param> - /// <param name="methodRef">The method reference.</param> - /// <param name="platformChanged">Whether the mod was compiled on a different platform.</param> - protected override bool IsMatch(Instruction instruction, MethodReference methodRef, bool platformChanged) - { - return methodRef.DeclaringType.FullName == "StardewModdingAPI.Extensions"; - } - } -} |