/// <summary> /// 停止并摧毁服务 /// </summary> public static void UnloadServices() { ServicesManagerImpl serviceManager = (ServicesManagerImpl)Manager.ServicesManager; foreach (var serv in serviceManager._serviceCollection) { try { serv.Stop(); } catch { } try { serv.Destory(); } catch { } } }
/// <summary> /// 卸载 /// </summary> public static void Unload() { foreach (var lib in OpenFx.LibsManager.Librarians) { try { lib.Destory(); } catch { } } ServicesManagerImpl serviceManager = (ServicesManagerImpl)OpenFx.ServicesManager; foreach (var serv in serviceManager._serviceCollection) { try { serv.Stop(); } catch { } try { serv.Destory(); } catch { } } }