Massive console refactor. Greatly simplify interface.

This commit is contained in:
Melanie
2019-08-20 23:28:59 +01:00
parent f7a496136d
commit 0fd17c08ae
56 changed files with 430 additions and 453 deletions

20
OpenSim/Framework/Console/ConsoleUtil.cs Normal file → Executable file
View File

@@ -75,7 +75,7 @@ namespace OpenSim.Framework.Console
{
if (File.Exists(path))
{
console.OutputFormat("File {0} already exists. Please move or remove it.", path);
console.Output("File {0} already exists. Please move or remove it.", null, path);
return false;
}
@@ -97,7 +97,7 @@ namespace OpenSim.Framework.Console
if (!UUID.TryParse(rawUuid, out uuid))
{
if (console != null)
console.OutputFormat("ERROR: {0} is not a valid uuid", rawUuid);
console.Output("ERROR: {0} is not a valid uuid", null, rawUuid);
return false;
}
@@ -110,7 +110,7 @@ namespace OpenSim.Framework.Console
if (!uint.TryParse(rawLocalId, out localId))
{
if (console != null)
console.OutputFormat("ERROR: {0} is not a valid local id", localId);
console.Output("ERROR: {0} is not a valid local id", null, localId);
return false;
}
@@ -118,7 +118,7 @@ namespace OpenSim.Framework.Console
if (localId == 0)
{
if (console != null)
console.OutputFormat("ERROR: {0} is not a valid local id - it must be greater than 0", localId);
console.Output("ERROR: {0} is not a valid local id - it must be greater than 0", null, localId);
return false;
}
@@ -150,7 +150,7 @@ namespace OpenSim.Framework.Console
}
if (console != null)
console.OutputFormat("ERROR: {0} is not a valid UUID or local id", rawId);
console.Output("ERROR: {0} is not a valid UUID or local id", null, rawId);
return false;
}
@@ -167,7 +167,7 @@ namespace OpenSim.Framework.Console
if (!bool.TryParse(rawConsoleString, out b))
{
if (console != null)
console.OutputFormat("ERROR: {0} is not a true or false value", rawConsoleString);
console.Output("ERROR: {0} is not a true or false value", null, rawConsoleString);
return false;
}
@@ -187,7 +187,7 @@ namespace OpenSim.Framework.Console
if (!int.TryParse(rawConsoleInt, out i))
{
if (console != null)
console.OutputFormat("ERROR: {0} is not a valid integer", rawConsoleInt);
console.Output("ERROR: {0} is not a valid integer", null, rawConsoleInt);
return false;
}
@@ -207,7 +207,7 @@ namespace OpenSim.Framework.Console
if (!float.TryParse(rawConsoleInput, out i))
{
if (console != null)
console.OutputFormat("ERROR: {0} is not a valid float", rawConsoleInput);
console.Output("ERROR: {0} is not a valid float", null, rawConsoleInput);
return false;
}
@@ -227,7 +227,7 @@ namespace OpenSim.Framework.Console
if (!double.TryParse(rawConsoleInput, out i))
{
if (console != null)
console.OutputFormat("ERROR: {0} is not a valid double", rawConsoleInput);
console.Output("ERROR: {0} is not a valid double", null, rawConsoleInput);
return false;
}
@@ -249,7 +249,7 @@ namespace OpenSim.Framework.Console
if (i < 0)
{
if (console != null)
console.OutputFormat("ERROR: {0} is not a positive integer", rawConsoleInt);
console.Output("ERROR: {0} is not a positive integer", null, rawConsoleInt);
return false;
}