feat:1、创建项目

This commit is contained in:
2026-06-25 15:22:28 +08:00
commit c05a65cdc3
6577 changed files with 1168287 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
using System;
namespace ChillConnect
{
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()
{
}
}
}