namespace Blue { /// /// 单例模式的基类 /// public class BlueSingleton where T : BlueSingleton, new() { private static T instance; public static T Instance { get { if (instance == null) { instance = new T(); } return instance; } } } }