Make ReadConfig a general features of consoles, rather than type dependent

This commit is contained in:
Melanie
2019-08-21 21:23:54 +01:00
parent 7e136c67fd
commit 110644c23a
6 changed files with 15 additions and 11 deletions

5
OpenSim/Framework/Console/CommandConsole.cs Normal file → Executable file
View File

@@ -36,6 +36,7 @@ using System.Text.RegularExpressions;
using System.Threading;
using log4net;
using OpenSim.Framework;
using Nini.Config;
namespace OpenSim.Framework.Console
{
@@ -789,5 +790,9 @@ namespace OpenSim.Framework.Console
}
return cmdinput;
}
public virtual void ReadConfig(IConfigSource configSource)
{
}
}
}

View File

@@ -30,6 +30,7 @@ using System.Threading;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using Nini.Config;
namespace OpenSim.Framework.Console
{
@@ -69,6 +70,8 @@ namespace OpenSim.Framework.Console
public string Prompt(string prompt, string defaultresponse, List<string> options) { return ""; }
public string PasswdPrompt(string p) { return ""; }
public void ReadConfig(IConfigSource configSource) { }
}
public class MockCommands : ICommands

View File

@@ -155,7 +155,7 @@ namespace OpenSim.Framework.Console
m_expireTimer.Start();
}
public void ReadConfig(IConfigSource config)
public override void ReadConfig(IConfigSource config)
{
m_Config = config;

View File

@@ -25,6 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using Nini.Config;
using System;
using System.Collections.Generic;
using System.Xml;
@@ -102,5 +103,7 @@ namespace OpenSim.Framework
void RunCommand(string cmd);
string ReadLine(string p, bool isCommand, bool e);
void ReadConfig(IConfigSource configSource);
}
}