public void Initialize() { Logger.Info("Starting up..."); Logger.Info("Loading Security settings..."); SC.Security.SecurityManager.Instance.ToString(); secProvider = new SC.Security.SecurityProvider("Root"); Logger.Info("Loading Licenses..."); SC.Security.LicenseManager.Initialize(); Logger.Info("Scanning for plugins..."); SC.PluginLoader.PluginLoader.Initialize(); Logger.Info("Loading Root settings..."); RootSettings newSettings = SC.Settings.SettingsManager.Instance.RestoreSettings("Root", typeof(RootSettings)) as RootSettings; if (newSettings != null) { settings = newSettings; } Logger.Info("Loading Servers..."); foreach (string Server in settings.Servers) { LoadServer(Server); } Logger.Info("Loading Plugins..."); foreach (string Plugin in settings.Plugins) { LoadPlugin(Plugin); } }
public void Cleanup() { Logger.Info("Shutting Down..."); Logger.Info("Saving Root Settings..."); RootSettings settings = new RootSettings(servers.Keys, plugins.Keys); SC.Settings.SettingsManager.Instance.SaveSettings("Root", settings); Logger.Info("Stopping Servers..."); foreach (SC.Core.Server s in servers.Values) { try { s.Stop(true); } catch (Exception) { // TODO } } Logger.Info("Stopping Plugins..."); foreach (SC.Interfaces.IScStandalonePluginBase plugin in plugins.Values) { try { plugin.Stop(); } catch (Exception) { // TODO } } secProvider.Cleanup(); Logger.Info("Stopping Plugin Loader..."); SC.PluginLoader.PluginLoader.Cleanup(); Logger.Info("Shutdown complete..."); }
public void Initialize() { Logger.Info("Starting up..."); Logger.Info("Loading Security settings..."); SC.Security.SecurityManager.Instance.ToString(); secProvider = new SC.Security.SecurityProvider("Root"); Logger.Info("Loading Licenses..."); SC.Security.LicenseManager.Initialize(); Logger.Info("Scanning for plugins..."); SC.PluginLoader.PluginLoader.Initialize(); Logger.Info("Loading Root settings..."); RootSettings newSettings = SC.Settings.SettingsManager.Instance.RestoreSettings("Root", typeof(RootSettings)) as RootSettings; if (newSettings != null) settings = newSettings; Logger.Info("Loading Servers..."); foreach (string Server in settings.Servers) LoadServer(Server); Logger.Info("Loading Plugins..."); foreach (string Plugin in settings.Plugins) LoadPlugin(Plugin); }