diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/ConfigurationMember.cs | 30 |
1 files changed, 18 insertions, 12 deletions
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 | |||
39 | { | 39 | { |
40 | public class ConfigurationMember | 40 | public class ConfigurationMember |
41 | { | 41 | { |
42 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 42 | #region Delegates |
43 | 43 | ||
44 | public delegate bool ConfigurationOptionResult(string configuration_key, object configuration_result); | 44 | public delegate bool ConfigurationOptionResult(string configuration_key, object configuration_result); |
45 | 45 | ||
46 | public delegate void ConfigurationOptionsLoad(); | 46 | public delegate void ConfigurationOptionsLoad(); |
47 | 47 | ||
48 | private List<ConfigurationOption> configurationOptions = new List<ConfigurationOption>(); | 48 | #endregion |
49 | private string configurationFilename = String.Empty; | 49 | |
50 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
51 | private int cE = 0; | ||
52 | |||
50 | private string configurationDescription = String.Empty; | 53 | private string configurationDescription = String.Empty; |
54 | private string configurationFilename = String.Empty; | ||
51 | private XmlNode configurationFromXMLNode = null; | 55 | private XmlNode configurationFromXMLNode = null; |
52 | private ConfigurationOptionsLoad loadFunction; | 56 | private List<ConfigurationOption> configurationOptions = new List<ConfigurationOption>(); |
53 | private ConfigurationOptionResult resultFunction; | ||
54 | |||
55 | private IGenericConfig configurationPlugin = null; | 57 | private IGenericConfig configurationPlugin = null; |
56 | private bool useConsoleToPromptOnError = true; | 58 | |
57 | /// <summary> | 59 | /// <summary> |
58 | /// This is the default configuration DLL loaded | 60 | /// This is the default configuration DLL loaded |
59 | /// </summary> | 61 | /// </summary> |
60 | private string configurationPluginFilename = "OpenSim.Framework.Configuration.XML.dll"; | 62 | private string configurationPluginFilename = "OpenSim.Framework.Configuration.XML.dll"; |
61 | 63 | ||
64 | private ConfigurationOptionsLoad loadFunction; | ||
65 | private ConfigurationOptionResult resultFunction; | ||
66 | |||
67 | private bool useConsoleToPromptOnError = true; | ||
68 | |||
62 | public ConfigurationMember(string configuration_filename, string configuration_description, | 69 | public ConfigurationMember(string configuration_filename, string configuration_description, |
63 | ConfigurationOptionsLoad load_function, ConfigurationOptionResult result_function, bool use_console_to_prompt_on_error) | 70 | ConfigurationOptionsLoad load_function, ConfigurationOptionResult result_function, bool use_console_to_prompt_on_error) |
64 | { | 71 | { |
@@ -150,7 +157,6 @@ namespace OpenSim.Framework | |||
150 | } | 157 | } |
151 | 158 | ||
152 | // TEMP - REMOVE | 159 | // TEMP - REMOVE |
153 | private int cE = 0; | ||
154 | public void performConfigurationRetrieve() | 160 | public void performConfigurationRetrieve() |
155 | { | 161 | { |
156 | if (cE > 1) | 162 | if (cE > 1) |
@@ -162,14 +168,14 @@ namespace OpenSim.Framework | |||
162 | if (loadFunction == null) | 168 | if (loadFunction == null) |
163 | { | 169 | { |
164 | m_log.Error("Load Function for '" + configurationDescription + | 170 | m_log.Error("Load Function for '" + configurationDescription + |
165 | "' is null. Refusing to run configuration."); | 171 | "' is null. Refusing to run configuration."); |
166 | return; | 172 | return; |
167 | } | 173 | } |
168 | 174 | ||
169 | if (resultFunction == null) | 175 | if (resultFunction == null) |
170 | { | 176 | { |
171 | m_log.Error("Result Function for '" + configurationDescription + | 177 | m_log.Error("Result Function for '" + configurationDescription + |
172 | "' is null. Refusing to run configuration."); | 178 | "' is null. Refusing to run configuration."); |
173 | return; | 179 | return; |
174 | } | 180 | } |
175 | 181 | ||
@@ -261,7 +267,7 @@ namespace OpenSim.Framework | |||
261 | { | 267 | { |
262 | console_result = | 268 | console_result = |
263 | MainConsole.Instance.CmdPrompt(configOption.configurationQuestion, | 269 | MainConsole.Instance.CmdPrompt(configOption.configurationQuestion, |
264 | configOption.configurationDefault); | 270 | configOption.configurationDefault); |
265 | } | 271 | } |
266 | } | 272 | } |
267 | else | 273 | else |
@@ -500,4 +506,4 @@ namespace OpenSim.Framework | |||
500 | configurationPlugin.Close(); | 506 | configurationPlugin.Close(); |
501 | } | 507 | } |
502 | } | 508 | } |
503 | } | 509 | } \ No newline at end of file |