summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/Deprecations/DeprecationWarning.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI/Framework/Deprecations/DeprecationWarning.cs')
-rw-r--r--src/SMAPI/Framework/Deprecations/DeprecationWarning.cs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/SMAPI/Framework/Deprecations/DeprecationWarning.cs b/src/SMAPI/Framework/Deprecations/DeprecationWarning.cs
index e00881b1..5936517b 100644
--- a/src/SMAPI/Framework/Deprecations/DeprecationWarning.cs
+++ b/src/SMAPI/Framework/Deprecations/DeprecationWarning.cs
@@ -1,5 +1,3 @@
-using System.Diagnostics;
-
namespace StardewModdingAPI.Framework.Deprecations
{
/// <summary>A deprecation warning for a mod.</summary>
@@ -26,6 +24,9 @@ namespace StardewModdingAPI.Framework.Deprecations
/// <summary>The stack trace when the deprecation warning was raised.</summary>
public ImmutableStackTrace StackTrace { get; }
+ /// <summary>Whether to log a stack trace showing where the deprecated code is in the mod.</summary>
+ public bool LogStackTrace { get; }
+
/*********
** Public methods
@@ -36,13 +37,15 @@ namespace StardewModdingAPI.Framework.Deprecations
/// <param name="version">The SMAPI version which deprecated it.</param>
/// <param name="level">The deprecation level for the affected code.</param>
/// <param name="stackTrace">The stack trace when the deprecation warning was raised.</param>
- public DeprecationWarning(IModMetadata? mod, string nounPhrase, string version, DeprecationLevel level, ImmutableStackTrace stackTrace)
+ /// <param name="logStackTrace">Whether to log a stack trace showing where the deprecated code is in the mod.</param>
+ public DeprecationWarning(IModMetadata? mod, string nounPhrase, string version, DeprecationLevel level, ImmutableStackTrace stackTrace, bool logStackTrace)
{
this.Mod = mod;
this.NounPhrase = nounPhrase;
this.Version = version;
this.Level = level;
this.StackTrace = stackTrace;
+ this.LogStackTrace = logStackTrace;
}
}
}