bingo 项目提交

This commit is contained in:
2026-04-20 13:49:36 +08:00
commit ad5920ac6a
5585 changed files with 1216243 additions and 0 deletions
@@ -0,0 +1,37 @@
using System;
namespace BingoBrain.Core
{
public class Singleton<T> : ISingleton, IDisposable where T : Singleton<T>, new()
{
private static T mInstance;
private static readonly object LockObject = new();
public static T Instance
{
get
{
lock (LockObject)
{
mInstance ??= new T();
mInstance.OnSingletonInit();
}
return mInstance;
}
}
public virtual void Dispose()
{
mInstance = null;
}
public void OnSingletonInit()
{
}
}
}