private void Initialize(XmlDocument doc) { RootNode = doc.DocumentElement; SettingsNode = RootNode.SelectSingleNode(SETTINGS_NODE); ConfigNodes = RootNode.SelectNodes(CONFIG_NODE); if (SettingsNode != null) { ActiveConfigName = SettingsNode.GetAttribute(ACTIVECONFIG_ATTR); ProcessModel = SettingsNode.GetAttribute(PROCESS_ATTR); DomainUsage = SettingsNode.GetAttribute(DOMAIN_ATTR); ProjectBase = SettingsNode.GetAttribute(APPBASE_ATTR); } if (ActiveConfigName == null && ConfigNodes.Count > 0) { ActiveConfigName = ConfigNodes[0].GetAttribute(NAME_ATTR); } if (ProjectBase == null) { ProjectBase = Path.GetDirectoryName(ProjectPath); } else if (ProjectPath != null) { ProjectBase = Path.Combine(Path.GetDirectoryName(ProjectPath), ProjectBase); } }
public string GetSetting(string name) { return SettingsNode != null ? SettingsNode.GetAttribute(name) : null; }