aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/General/UserConfig.cs
diff options
context:
space:
mode:
authorlbsa712007-10-30 09:05:31 +0000
committerlbsa712007-10-30 09:05:31 +0000
commit67e12b95ea7b68f4904a7484d77ecfd787d16d0c (patch)
tree20b00d24c8a7617017960432ec044852e3ad5fa9 /OpenSim/Framework/General/UserConfig.cs
parent* Deleted .user file (diff)
downloadopensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.zip
opensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.gz
opensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.bz2
opensim-SC-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.xz
* Optimized usings
* Shortened type references * Removed redundant 'this' qualifier
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/General/UserConfig.cs43
1 files changed, 24 insertions, 19 deletions
diff --git a/OpenSim/Framework/General/UserConfig.cs b/OpenSim/Framework/General/UserConfig.cs
index 3d79fc9..9abe61f 100644
--- a/OpenSim/Framework/General/UserConfig.cs
+++ b/OpenSim/Framework/General/UserConfig.cs
@@ -26,10 +26,6 @@
26* 26*
27*/ 27*/
28 28
29using System;
30using System.Collections.Generic;
31using System.Text;
32
33namespace OpenSim.Framework 29namespace OpenSim.Framework
34{ 30{
35 /// <summary> 31 /// <summary>
@@ -51,21 +47,30 @@ namespace OpenSim.Framework
51 47
52 public UserConfig(string description, string filename) 48 public UserConfig(string description, string filename)
53 { 49 {
54 configMember = new ConfigurationMember(filename, description, this.loadConfigurationOptions, this.handleIncomingConfiguration); 50 configMember =
51 new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration);
55 configMember.performConfigurationRetrieve(); 52 configMember.performConfigurationRetrieve();
56 } 53 }
57 54
58 public void loadConfigurationOptions() 55 public void loadConfigurationOptions()
59 { 56 {
60 configMember.addConfigurationOption("default_startup_message", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Startup Message", "Welcome to OGS", false); 57 configMember.addConfigurationOption("default_startup_message",
61 58 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
62 configMember.addConfigurationOption("default_grid_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Grid Server URI", "http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString() + "/", false); 59 "Default Startup Message", "Welcome to OGS", false);
63 configMember.addConfigurationOption("grid_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to grid server", "null", false);
64 configMember.addConfigurationOption("grid_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from grid server", "null", false);
65 configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false);
66 60
67 configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "Http Listener port", DefaultHttpPort.ToString(), false); 61 configMember.addConfigurationOption("default_grid_server",
62 ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
63 "Default Grid Server URI",
64 "http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString() + "/", false);
65 configMember.addConfigurationOption("grid_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
66 "Key to send to grid server", "null", false);
67 configMember.addConfigurationOption("grid_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
68 "Key to expect from grid server", "null", false);
69 configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
70 "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false);
68 71
72 configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
73 "Http Listener port", DefaultHttpPort.ToString(), false);
69 } 74 }
70 75
71 public bool handleIncomingConfiguration(string configuration_key, object configuration_result) 76 public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
@@ -73,26 +78,26 @@ namespace OpenSim.Framework
73 switch (configuration_key) 78 switch (configuration_key)
74 { 79 {
75 case "default_startup_message": 80 case "default_startup_message":
76 this.DefaultStartupMsg = (string)configuration_result; 81 DefaultStartupMsg = (string) configuration_result;
77 break; 82 break;
78 case "default_grid_server": 83 case "default_grid_server":
79 this.GridServerURL = (string)configuration_result; 84 GridServerURL = (string) configuration_result;
80 break; 85 break;
81 case "grid_send_key": 86 case "grid_send_key":
82 this.GridSendKey = (string)configuration_result; 87 GridSendKey = (string) configuration_result;
83 break; 88 break;
84 case "grid_recv_key": 89 case "grid_recv_key":
85 this.GridRecvKey = (string)configuration_result; 90 GridRecvKey = (string) configuration_result;
86 break; 91 break;
87 case "database_provider": 92 case "database_provider":
88 this.DatabaseProvider = (string)configuration_result; 93 DatabaseProvider = (string) configuration_result;
89 break; 94 break;
90 case "http_port": 95 case "http_port":
91 HttpPort = (uint)configuration_result; 96 HttpPort = (uint) configuration_result;
92 break; 97 break;
93 } 98 }
94 99
95 return true; 100 return true;
96 } 101 }
97 } 102 }
98} 103} \ No newline at end of file