diff options
Diffstat (limited to 'src/StardewModdingAPI.AssemblyRewriters/Rewriters/GenericMethodMapper.cs')
-rw-r--r-- | src/StardewModdingAPI.AssemblyRewriters/Rewriters/GenericMethodMapper.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/StardewModdingAPI.AssemblyRewriters/Rewriters/GenericMethodMapper.cs b/src/StardewModdingAPI.AssemblyRewriters/Rewriters/GenericMethodMapper.cs index 92ba3af1..49e0aad7 100644 --- a/src/StardewModdingAPI.AssemblyRewriters/Rewriters/GenericMethodMapper.cs +++ b/src/StardewModdingAPI.AssemblyRewriters/Rewriters/GenericMethodMapper.cs @@ -34,13 +34,13 @@ namespace StardewModdingAPI.AssemblyRewriters.Rewriters /// <summary>Construct an instance.</summary> /// <param name="fromType">The type whose methods to remap.</param> /// <param name="toType">The type with methods to map to.</param> - /// <param name="nounPhrase">A brief noun phrase indicating what the instruction finder matches.</param> /// <param name="onlyIfPlatformChanged">Whether to only rewrite references if loading the assembly on a different platform than it was compiled on.</param> - public GenericMethodMapper(Type fromType, Type toType, string nounPhrase, bool onlyIfPlatformChanged = false) + /// <param name="nounPhrase">A brief noun phrase indicating what the instruction finder matches (or <c>null</c> to generate one).</param> + public GenericMethodMapper(Type fromType, Type toType, bool onlyIfPlatformChanged = false, string nounPhrase = null) { this.FromType = fromType; this.ToType = toType; - this.NounPhrase = nounPhrase; + this.NounPhrase = nounPhrase ?? $"{fromType.Name} methods"; this.OnlyIfPlatformChanged = onlyIfPlatformChanged; } @@ -71,4 +71,4 @@ namespace StardewModdingAPI.AssemblyRewriters.Rewriters methodRef.DeclaringType = module.Import(this.ToType); } } -}
\ No newline at end of file +} |