From 14fab29370310a762a000c50b23075326b4e95da Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 6 Oct 2018 00:25:48 -0400 Subject: add save and day-started events for 3.0 (#310) --- src/SMAPI/Framework/Singleton.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/SMAPI/Framework/Singleton.cs (limited to 'src/SMAPI/Framework/Singleton.cs') diff --git a/src/SMAPI/Framework/Singleton.cs b/src/SMAPI/Framework/Singleton.cs new file mode 100644 index 00000000..399a8bf0 --- /dev/null +++ b/src/SMAPI/Framework/Singleton.cs @@ -0,0 +1,10 @@ +namespace StardewModdingAPI.Framework +{ + /// Provides singleton instances of a given type. + /// The instance type. + internal static class Singleton where T : new() + { + /// The singleton instance. + public static T Instance { get; } = new T(); + } +} -- cgit