提交
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
namespace Roy
|
||||
{
|
||||
/// <summary>
|
||||
/// 管理类基类
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
public class BaseManager<T> where T : new()
|
||||
{
|
||||
private static T _instance;
|
||||
|
||||
public static T GetInstance
|
||||
{
|
||||
get
|
||||
{
|
||||
_instance ??= new T();
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user