public void Load(HomeSimCockpitSDK.ILog log) { _log = log; // wczytanie konfiguracji _configuration = ModulesConfiguration.Load(); }
public static ModulesConfiguration Load() { ModulesConfiguration c = new ModulesConfiguration(); if (File.Exists(ConfigurationFilePath)) { XmlDocument xml = new XmlDocument(); xml.Load(ConfigurationFilePath); c.Server = ServerSettings.Load(xml.SelectSingleNode("/configuration/server")); XmlNodeList nodes = xml.SelectNodes("/configuration/applications/application"); List <HttpApplication> applications = new List <HttpApplication>(); foreach (XmlNode node in nodes) { applications.Add(HttpApplication.Load(node)); } c.Applications = applications.ToArray(); } return(c); }