diff options
Diffstat (limited to 'OpenSim/Framework/Console')
-rw-r--r-- | OpenSim/Framework/Console/CommandConsole.cs | 11 | ||||
-rwxr-xr-x | OpenSim/Framework/Console/ConsoleBase.cs | 2 | ||||
-rw-r--r-- | OpenSim/Framework/Console/MainConsole.cs | 40 |
3 files changed, 7 insertions, 46 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; | |||
33 | using System.Text; | 33 | using System.Text; |
34 | using System.Threading; | 34 | using System.Threading; |
35 | using log4net; | 35 | using log4net; |
36 | using OpenSim.Framework; | ||
36 | 37 | ||
37 | namespace OpenSim.Framework.Console | 38 | namespace 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 | } |
diff --git a/OpenSim/Framework/Console/ConsoleBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs index c59fbca..4b375d9 100755 --- a/OpenSim/Framework/Console/ConsoleBase.cs +++ b/OpenSim/Framework/Console/ConsoleBase.cs | |||
@@ -41,7 +41,7 @@ namespace OpenSim.Framework.Console | |||
41 | 41 | ||
42 | protected string prompt = "# "; | 42 | protected string prompt = "# "; |
43 | 43 | ||
44 | public object ConsoleScene = null; | 44 | public object ConsoleScene { get; set; } |
45 | 45 | ||
46 | /// <summary> | 46 | /// <summary> |
47 | /// The default prompt text. | 47 | /// The default prompt text. |
diff --git a/OpenSim/Framework/Console/MainConsole.cs b/OpenSim/Framework/Console/MainConsole.cs deleted file mode 100644 index 24be617..0000000 --- a/OpenSim/Framework/Console/MainConsole.cs +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | namespace OpenSim.Framework.Console | ||
29 | { | ||
30 | public class MainConsole | ||
31 | { | ||
32 | private static CommandConsole instance; | ||
33 | |||
34 | public static CommandConsole Instance | ||
35 | { | ||
36 | get { return instance; } | ||
37 | set { instance = value; } | ||
38 | } | ||
39 | } | ||
40 | } | ||