aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Console/CommandConsole.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-10-25 20:24:21 +0100
committerJustin Clark-Casey (justincc)2011-10-25 20:24:21 +0100
commit8a0a78cbccce796addacab7ed1609279b802a9b3 (patch)
tree31ddb6da7bca6eeb61cb7747532dcf77828cfbe3 /OpenSim/Framework/Console/CommandConsole.cs
parentDrop some unnecessary ContainsKey() checking before Remove() in BaseHttpServer() (diff)
downloadopensim-SC_OLD-8a0a78cbccce796addacab7ed1609279b802a9b3.zip
opensim-SC_OLD-8a0a78cbccce796addacab7ed1609279b802a9b3.tar.gz
opensim-SC_OLD-8a0a78cbccce796addacab7ed1609279b802a9b3.tar.bz2
opensim-SC_OLD-8a0a78cbccce796addacab7ed1609279b802a9b3.tar.xz
Make OpenSim.Framework.Servers.HttpServer rely on OpenSim.Framework instead of the other way around.
This is necessary so that code in HttpServer can use framework facilities such as the thread watchdog for monitoring purposes. Doing this shuffle meant that MainServer was moved into OpenSim/Framework/Servers Also had to make OpenSim.Framework.Console rely on OpenSim.Framework rather than the other way around since it in turn relies on HttpServer MainConsole and some new interfaces had to be moved into OpenSim/Framework to allow this. This can be reverted if parts of OpenSim.Framework stop relying on console presence (cheifly RegionInfo)
Diffstat (limited to 'OpenSim/Framework/Console/CommandConsole.cs')
-rw-r--r--OpenSim/Framework/Console/CommandConsole.cs11
1 files changed, 6 insertions, 5 deletions
diff --git a/OpenSim/Framework/Console/CommandConsole.cs b/OpenSim/Framework/Console/CommandConsole.cs
index be36cf2..f10b857 100644
--- a/OpenSim/Framework/Console/CommandConsole.cs
+++ b/OpenSim/Framework/Console/CommandConsole.cs
@@ -33,12 +33,11 @@ using System.Reflection;
33using System.Text; 33using System.Text;
34using System.Threading; 34using System.Threading;
35using log4net; 35using log4net;
36using OpenSim.Framework;
36 37
37namespace OpenSim.Framework.Console 38namespace OpenSim.Framework.Console
38{ 39{
39 public delegate void CommandDelegate(string module, string[] cmd); 40 public class Commands : ICommands
40
41 public class Commands
42 { 41 {
43 /// <summary> 42 /// <summary>
44 /// Encapsulates a command that can be invoked from the console 43 /// Encapsulates a command that can be invoked from the console
@@ -564,14 +563,16 @@ namespace OpenSim.Framework.Console
564 /// <summary> 563 /// <summary>
565 /// A console that processes commands internally 564 /// A console that processes commands internally
566 /// </summary> 565 /// </summary>
567 public class CommandConsole : ConsoleBase 566 public class CommandConsole : ConsoleBase, ICommandConsole
568 { 567 {
569 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 568 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
570 569
571 public Commands Commands = new Commands(); 570 public ICommands Commands { get; private set; }
572 571
573 public CommandConsole(string defaultPrompt) : base(defaultPrompt) 572 public CommandConsole(string defaultPrompt) : base(defaultPrompt)
574 { 573 {
574 Commands = new Commands();
575
575 Commands.AddCommand("console", false, "help", "help [<command>]", 576 Commands.AddCommand("console", false, "help", "help [<command>]",
576 "Get general command list or more detailed help on a specific command", Help); 577 "Get general command list or more detailed help on a specific command", Help);
577 } 578 }