diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-05-01 18:16:09 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-05-01 18:16:09 -0400 |
commit | c8ad50dad1d706a1901798f9396f6becfea36c0e (patch) | |
tree | 28bd818a5db39ec5ece1bd141a28de955950463b /src/SMAPI/Mod.cs | |
parent | 451b70953ff4c0b1b27ae0de203ad99379b45b2a (diff) | |
parent | f78093bdb58d477b400cde3f19b70ffd6ddf833d (diff) | |
download | SMAPI-c8ad50dad1d706a1901798f9396f6becfea36c0e.tar.gz SMAPI-c8ad50dad1d706a1901798f9396f6becfea36c0e.tar.bz2 SMAPI-c8ad50dad1d706a1901798f9396f6becfea36c0e.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/Mod.cs')
-rw-r--r-- | src/SMAPI/Mod.cs | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/SMAPI/Mod.cs b/src/SMAPI/Mod.cs index 0e5be1c1..f764752b 100644 --- a/src/SMAPI/Mod.cs +++ b/src/SMAPI/Mod.cs @@ -8,30 +8,32 @@ namespace StardewModdingAPI /********* ** Accessors *********/ - /// <summary>Provides simplified APIs for writing mods.</summary> - public IModHelper Helper { get; internal set; } + /// <inheritdoc /> + public IModHelper Helper { get; internal set; } = null!; - /// <summary>Writes messages to the console and log file.</summary> - public IMonitor Monitor { get; internal set; } + /// <inheritdoc /> + public IMonitor Monitor { get; internal set; } = null!; - /// <summary>The mod's manifest.</summary> - public IManifest ModManifest { get; internal set; } + /// <inheritdoc /> + public IManifest ModManifest { get; internal set; } = null!; /********* ** Public methods *********/ - /// <summary>The mod entry point, called after the mod is first loaded.</summary> - /// <param name="helper">Provides simplified APIs for writing mods.</param> + /// <inheritdoc /> public abstract void Entry(IModHelper helper); - /// <summary>Get an API that other mods can access. This is always called after <see cref="Entry"/>.</summary> - public virtual object GetApi() => null; + /// <inheritdoc /> + public virtual object? GetApi() + { + return null; + } /// <summary>Release or reset unmanaged resources.</summary> public void Dispose() { - (this.Helper as IDisposable)?.Dispose(); // deliberate do this outside overridable dispose method so mods don't accidentally suppress it + (this.Helper as IDisposable)?.Dispose(); // deliberately do this outside overridable dispose method so mods don't accidentally suppress it this.Dispose(true); GC.SuppressFinalize(this); } @@ -47,6 +49,7 @@ namespace StardewModdingAPI /// <summary>Destruct the instance.</summary> ~Mod() { + (this.Helper as IDisposable)?.Dispose(); // deliberately do this outside overridable dispose method so mods don't accidentally suppress it this.Dispose(false); } } |