/// <summary> /// 获取单例对象的方法 /// </summary> /// <returns></returns> public static ActivityMonitor GetMonitor() { if (uniqueMonitor != null) { return(uniqueMonitor); } lock (locker) { uniqueMonitor = new ActivityMonitor(); } return(uniqueMonitor); }
/// <summary> /// 释放单例对象 /// </summary> public static void Dispose() { uniqueMonitor = null; }