From 929dccb75a1405737975d76648e015a3e7c00177 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 7 Oct 2017 23:07:10 -0400 Subject: reorganise repo structure --- src/StardewModdingAPI/Mod.cs | 50 -------------------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 src/StardewModdingAPI/Mod.cs (limited to 'src/StardewModdingAPI/Mod.cs') diff --git a/src/StardewModdingAPI/Mod.cs b/src/StardewModdingAPI/Mod.cs deleted file mode 100644 index ee75ba54..00000000 --- a/src/StardewModdingAPI/Mod.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; - -namespace StardewModdingAPI -{ - /// The base class for a mod. - public abstract class Mod : IMod, IDisposable - { - /********* - ** Accessors - *********/ - /// Provides simplified APIs for writing mods. - public IModHelper Helper { get; internal set; } - - /// Writes messages to the console and log file. - public IMonitor Monitor { get; internal set; } - - /// The mod's manifest. - public IManifest ModManifest { get; internal set; } - - - /********* - ** Public methods - *********/ - /// The mod entry point, called after the mod is first loaded. - /// Provides simplified APIs for writing mods. - public abstract void Entry(IModHelper helper); - - /// Release or reset unmanaged resources. - public void Dispose() - { - (this.Helper as IDisposable)?.Dispose(); // deliberate do this outside overridable dispose method so mods don't accidentally suppress it - this.Dispose(true); - GC.SuppressFinalize(this); - } - - - /********* - ** Private methods - *********/ - /// Release or reset unmanaged resources when the game exits. There's no guarantee this will be called on every exit. - /// Whether the instance is being disposed explicitly rather than finalised. If this is false, the instance shouldn't dispose other objects since they may already be finalised. - protected virtual void Dispose(bool disposing) { } - - /// Destruct the instance. - ~Mod() - { - this.Dispose(false); - } - } -} -- cgit