additional package setup

This commit is contained in:
2025-11-16 18:31:17 -05:00
parent 3da42beb46
commit 2ca8077013
55 changed files with 1746 additions and 12 deletions

View File

@@ -0,0 +1,14 @@
using System;
namespace Boxfriend.Utils
{
public abstract class Singleton<T> where T : class, new()
{
public static T Instance => _instance;
private static T _instance;
private static T InitializeSingleton (T obj = null) => _instance = obj ?? new T();
public Singleton():this(null){}
public Singleton (T obj) => InitializeSingleton(obj);
}
}