summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-07-29 22:50:50 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-07-29 22:50:50 -0400
commit737a434ad6704d22776f463c192b9a9748ce2a21 (patch)
tree87d3a3e27e44f36f2a17776efa6492f1d4dd7797 /src/SMAPI/Framework
parent880cd7b8bacfcee2cc6a8e15b6b8ea5e05e9467c (diff)
downloadSMAPI-737a434ad6704d22776f463c192b9a9748ce2a21.tar.gz
SMAPI-737a434ad6704d22776f463c192b9a9748ce2a21.tar.bz2
SMAPI-737a434ad6704d22776f463c192b9a9748ce2a21.zip
reduce ErrorHandler's direct references to internal SMAPI code
That will allow removing the InternalsVisibleTo attribute to avoid namespace conflicts in an upcoming commit.
Diffstat (limited to 'src/SMAPI/Framework')
-rw-r--r--src/SMAPI/Framework/SCore.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs
index 4211abc5..b607f95d 100644
--- a/src/SMAPI/Framework/SCore.cs
+++ b/src/SMAPI/Framework/SCore.cs
@@ -2,6 +2,7 @@ using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Net;
@@ -310,6 +311,14 @@ namespace StardewModdingAPI.Framework
}
}
+ /// <summary>Get the core logger and monitor on behalf of the game.</summary>
+ /// <remarks>This method is called using reflection by the ErrorHandler mod to log game errors.</remarks>
+ [SuppressMessage("ReSharper", "UnusedMember.Global", Justification = "Used via reflection")]
+ public IMonitor GetMonitorForGame()
+ {
+ return this.LogManager.MonitorForGame;
+ }
+
/// <summary>Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.</summary>
public void Dispose()
{