diff options
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Framework/Commander.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Framework/Commander.cs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/OpenSim/Region/Environment/Modules/Framework/Commander.cs b/OpenSim/Region/Environment/Modules/Framework/Commander.cs index 4430c10..d226c3d 100644 --- a/OpenSim/Region/Environment/Modules/Framework/Commander.cs +++ b/OpenSim/Region/Environment/Modules/Framework/Commander.cs | |||
@@ -42,11 +42,11 @@ namespace OpenSim.Region.Environment.Modules.Framework | |||
42 | public class Command : ICommand | 42 | public class Command : ICommand |
43 | { | 43 | { |
44 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 44 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | private List<CommandArgument> m_args = new List<CommandArgument>(); | 45 | private readonly List<CommandArgument> m_args = new List<CommandArgument>(); |
46 | 46 | ||
47 | private Action<object[]> m_command; | 47 | private readonly Action<object[]> m_command; |
48 | private string m_help; | 48 | private readonly string m_help; |
49 | private string m_name; | 49 | private readonly string m_name; |
50 | 50 | ||
51 | public Command(string name, Action<Object[]> command, string help) | 51 | public Command(string name, Action<Object[]> command, string help) |
52 | { | 52 | { |
@@ -164,9 +164,9 @@ namespace OpenSim.Region.Environment.Modules.Framework | |||
164 | /// </summary> | 164 | /// </summary> |
165 | public class CommandArgument | 165 | public class CommandArgument |
166 | { | 166 | { |
167 | private string m_help; | 167 | private readonly string m_help; |
168 | private string m_name; | 168 | private readonly string m_name; |
169 | private string m_type; | 169 | private readonly string m_type; |
170 | private Object m_val; | 170 | private Object m_val; |
171 | 171 | ||
172 | public CommandArgument(string name, string help, string type) | 172 | public CommandArgument(string name, string help, string type) |
@@ -204,8 +204,8 @@ namespace OpenSim.Region.Environment.Modules.Framework | |||
204 | public class Commander : ICommander | 204 | public class Commander : ICommander |
205 | { | 205 | { |
206 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 206 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
207 | private Dictionary<string, ICommand> m_commands = new Dictionary<string, ICommand>(); | 207 | private readonly Dictionary<string, ICommand> m_commands = new Dictionary<string, ICommand>(); |
208 | private string m_name; | 208 | private readonly string m_name; |
209 | 209 | ||
210 | public Commander(string name) | 210 | public Commander(string name) |
211 | { | 211 | { |
@@ -235,11 +235,11 @@ namespace OpenSim.Region.Environment.Modules.Framework | |||
235 | } | 235 | } |
236 | classSrc = classSrc.Remove(classSrc.Length - 1); // Delete the last comma | 236 | classSrc = classSrc.Remove(classSrc.Length - 1); // Delete the last comma |
237 | classSrc += " )\n\t{\n"; | 237 | classSrc += " )\n\t{\n"; |
238 | classSrc += "\t\tObject[] args = new Object[" + com.Arguments.Count.ToString() + "];\n"; | 238 | classSrc += "\t\tObject[] args = new Object[" + com.Arguments.Count + "];\n"; |
239 | int i = 0; | 239 | int i = 0; |
240 | foreach (KeyValuePair<string, string> arg in com.Arguments) | 240 | foreach (KeyValuePair<string, string> arg in com.Arguments) |
241 | { | 241 | { |
242 | classSrc += "\t\targs[" + i.ToString() + "] = " + Util.Md5Hash(arg.Key) + " " + ";\n"; | 242 | classSrc += "\t\targs[" + i + "] = " + Util.Md5Hash(arg.Key) + " " + ";\n"; |
243 | i++; | 243 | i++; |
244 | } | 244 | } |
245 | classSrc += "\t\tGetCommander(\"" + m_name + "\").Run(\"" + com.Name + "\", args);\n"; | 245 | classSrc += "\t\tGetCommander(\"" + m_name + "\").Run(\"" + com.Name + "\", args);\n"; |