From 375163a6fece8b3a57c7555246abe8338223a599 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Tue, 29 Apr 2008 14:04:55 +0000 Subject: * Spring cleaning. * Added new generic "Location" class to handle 2D integer locations. Going to use it to replace all RegionHandle and X,Y coordinate references throughout the entire project. You have been warned. --- OpenSim/Framework/ConfigurationMember.cs | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) (limited to 'OpenSim/Framework/ConfigurationMember.cs') diff --git a/OpenSim/Framework/ConfigurationMember.cs b/OpenSim/Framework/ConfigurationMember.cs index 12590b4..91b87a5 100644 --- a/OpenSim/Framework/ConfigurationMember.cs +++ b/OpenSim/Framework/ConfigurationMember.cs @@ -39,26 +39,33 @@ namespace OpenSim.Framework { public class ConfigurationMember { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + #region Delegates public delegate bool ConfigurationOptionResult(string configuration_key, object configuration_result); public delegate void ConfigurationOptionsLoad(); - private List configurationOptions = new List(); - private string configurationFilename = String.Empty; + #endregion + + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private int cE = 0; + private string configurationDescription = String.Empty; + private string configurationFilename = String.Empty; private XmlNode configurationFromXMLNode = null; - private ConfigurationOptionsLoad loadFunction; - private ConfigurationOptionResult resultFunction; - + private List configurationOptions = new List(); private IGenericConfig configurationPlugin = null; - private bool useConsoleToPromptOnError = true; + /// /// This is the default configuration DLL loaded /// private string configurationPluginFilename = "OpenSim.Framework.Configuration.XML.dll"; + private ConfigurationOptionsLoad loadFunction; + private ConfigurationOptionResult resultFunction; + + private bool useConsoleToPromptOnError = true; + public ConfigurationMember(string configuration_filename, string configuration_description, ConfigurationOptionsLoad load_function, ConfigurationOptionResult result_function, bool use_console_to_prompt_on_error) { @@ -150,7 +157,6 @@ namespace OpenSim.Framework } // TEMP - REMOVE - private int cE = 0; public void performConfigurationRetrieve() { if (cE > 1) @@ -162,14 +168,14 @@ namespace OpenSim.Framework if (loadFunction == null) { m_log.Error("Load Function for '" + configurationDescription + - "' is null. Refusing to run configuration."); + "' is null. Refusing to run configuration."); return; } if (resultFunction == null) { m_log.Error("Result Function for '" + configurationDescription + - "' is null. Refusing to run configuration."); + "' is null. Refusing to run configuration."); return; } @@ -261,7 +267,7 @@ namespace OpenSim.Framework { console_result = MainConsole.Instance.CmdPrompt(configOption.configurationQuestion, - configOption.configurationDefault); + configOption.configurationDefault); } } else @@ -500,4 +506,4 @@ namespace OpenSim.Framework configurationPlugin.Close(); } } -} +} \ No newline at end of file -- cgit v1.1