public RegionInfo(string description, string filename, bool skipConsoleConfig, IConfigSource configSource, string configName) { // m_configSource = configSource; if (filename.ToLower().EndsWith(".ini")) { if (!File.Exists(filename)) // New region config request { IniConfigSource newFile = new IniConfigSource(); ReadNiniConfig(newFile, String.Empty); newFile.Save(filename); RegionFile = filename; return; } IniConfigSource source = new IniConfigSource(filename); bool saveFile = false; if (source.Configs[configName] == null) { saveFile = true; } ReadNiniConfig(source, configName); if (configName != String.Empty && saveFile) { source.Save(filename); } RegionFile = filename; return; } try { // This will throw if it's not legal Nini XML format // and thereby toss it to the legacy loader // IConfigSource xmlsource = new XmlConfigSource(filename); ReadNiniConfig(xmlsource, configName); RegionFile = filename; return; } catch (Exception) { } configMember = new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration, !skipConsoleConfig); configMember.performConfigurationRetrieve(); RegionFile = filename; }
// The web loader uses this // public RegionInfo(string description, XmlNode xmlNode, bool skipConsoleConfig, IConfigSource configSource) { // m_configSource = configSource; configMember = new ConfigurationMember(xmlNode, description, loadConfigurationOptions, handleIncomingConfiguration, !skipConsoleConfig); configMember.performConfigurationRetrieve(); }
public void SaveRegionToFile(string description, string filename) { configMember = new ConfigurationMember(filename, description, loadConfigurationOptionsFromMe, ignoreIncomingConfiguration, false); configMember.performConfigurationRetrieve(); RegionFile = filename; }
public void SaveRegionToFile(string description, string filename) { if (filename.ToLower().EndsWith(".ini")) { IniConfigSource source = new IniConfigSource(); try { source = new IniConfigSource(filename); // Load if it exists } catch (Exception) { } WriteNiniConfig(source); source.Save(filename); return; } else if (filename.ToLower().EndsWith(".xml")) { configMember = new ConfigurationMember(filename, description, loadConfigurationOptionsFromMe, ignoreIncomingConfiguration, false); configMember.performConfigurationRetrieve(); RegionFile = filename; } else { throw new Exception("Invalid file type for region persistence."); } }
public RegionSettings() { if (configMember == null) { try { configMember = new ConfigurationMember(Path.Combine(Util.configDir(), "estate_settings.xml"), "ESTATE SETTINGS", LoadConfigurationOptions, HandleIncomingConfiguration, true); configMember.performConfigurationRetrieve(); } catch (Exception) { } } }
public EstateSettings() { if (configMember == null) { try { // Load legacy defaults // configMember = new ConfigurationMember(Path.Combine(Util.configDir(), "estate_settings.xml"), "ESTATE SETTINGS", loadConfigurationOptions, handleIncomingConfiguration, true); l_EstateManagers.Clear(); configMember.performConfigurationRetrieve(); } catch (Exception) { } } }
public GridConfig(string description, string filename) { m_configMember = new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration, true); m_configMember.performConfigurationRetrieve(); }
public void SaveRegionToFile(string description, string filename) { if (filename.ToLower().EndsWith(".ini")) { IniConfigSource source = new IniConfigSource(); try { source = new IniConfigSource(filename); // Load if it exists } catch (Exception) { } WriteNiniConfig(source); source.Save(filename); return; } else if (filename.ToLower().EndsWith(".xml")) { configMember = new ConfigurationMember(filename, description, loadConfigurationOptionsFromMe, ignoreIncomingConfiguration, false); configMember.performConfigurationRetrieve(); RegionFile = filename; } else throw new Exception("Invalid file type for region persistence."); }
// The web loader uses this // public RegionInfo(string description, XmlNode xmlNode, bool skipConsoleConfig, IConfigSource configSource) { // m_configSource = configSource; configMember = new ConfigurationMember(xmlNode, description, loadConfigurationOptions, handleIncomingConfiguration, !skipConsoleConfig); configMember.performConfigurationRetrieve(); m_serverURI = string.Empty; }
public RegionInfo(string description, string filename, bool skipConsoleConfig, IConfigSource configSource, string configName) { // m_configSource = configSource; if (filename.ToLower().EndsWith(".ini")) { if (!File.Exists(filename)) // New region config request { IniConfigSource newFile = new IniConfigSource(); ReadNiniConfig(newFile, configName); newFile.Save(filename); RegionFile = filename; return; } IniConfigSource source = new IniConfigSource(filename); bool saveFile = false; if (source.Configs[configName] == null) saveFile = true; ReadNiniConfig(source, configName); if (configName != String.Empty && saveFile) source.Save(filename); RegionFile = filename; return; } try { // This will throw if it's not legal Nini XML format // and thereby toss it to the legacy loader // IConfigSource xmlsource = new XmlConfigSource(filename); ReadNiniConfig(xmlsource, configName); RegionFile = filename; return; } catch (Exception) { } configMember = new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration, !skipConsoleConfig); configMember.performConfigurationRetrieve(); RegionFile = filename; }