aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Console
diff options
context:
space:
mode:
authorlbsa712007-10-30 09:05:31 +0000
committerlbsa712007-10-30 09:05:31 +0000
commit67e12b95ea7b68f4904a7484d77ecfd787d16d0c (patch)
tree20b00d24c8a7617017960432ec044852e3ad5fa9 /OpenSim/Framework/Console
parent* Deleted .user file (diff)
downloadopensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.zip
opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.gz
opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.bz2
opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.xz
* Optimized usings
* Shortened type references * Removed redundant 'this' qualifier
Diffstat (limited to 'OpenSim/Framework/Console')
-rw-r--r--OpenSim/Framework/Console/AssemblyInfo.cs22
-rw-r--r--OpenSim/Framework/Console/ConsoleCallbacksBase.cs4
-rw-r--r--OpenSim/Framework/Console/LogBase.cs31
-rw-r--r--OpenSim/Framework/Console/MainLog.cs11
4 files changed, 34 insertions, 34 deletions
diff --git a/OpenSim/Framework/Console/AssemblyInfo.cs b/OpenSim/Framework/Console/AssemblyInfo.cs
index 7e7c77a..bfad5b7 100644
--- a/OpenSim/Framework/Console/AssemblyInfo.cs
+++ b/OpenSim/Framework/Console/AssemblyInfo.cs
@@ -27,24 +27,26 @@
27*/ 27*/
28using System.Reflection; 28using System.Reflection;
29using System.Runtime.InteropServices; 29using System.Runtime.InteropServices;
30
30// Information about this assembly is defined by the following 31// Information about this assembly is defined by the following
31// attributes. 32// attributes.
32// 33//
33// change them to the information which is associated with the assembly 34// change them to the information which is associated with the assembly
34// you compile. 35// you compile.
35 36
36[assembly: AssemblyTitle("ServerConsole")] 37[assembly : AssemblyTitle("ServerConsole")]
37[assembly: AssemblyDescription("")] 38[assembly : AssemblyDescription("")]
38[assembly: AssemblyConfiguration("")] 39[assembly : AssemblyConfiguration("")]
39[assembly: AssemblyCompany("")] 40[assembly : AssemblyCompany("")]
40[assembly: AssemblyProduct("ServerConsole")] 41[assembly : AssemblyProduct("ServerConsole")]
41[assembly: AssemblyCopyright("")] 42[assembly : AssemblyCopyright("")]
42[assembly: AssemblyTrademark("")] 43[assembly : AssemblyTrademark("")]
43[assembly: AssemblyCulture("")] 44[assembly : AssemblyCulture("")]
44 45
45// This sets the default COM visibility of types in the assembly to invisible. 46// This sets the default COM visibility of types in the assembly to invisible.
46// If you need to expose a type to COM, use [ComVisible(true)] on that type. 47// If you need to expose a type to COM, use [ComVisible(true)] on that type.
47[assembly: ComVisible(false)] 48
49[assembly : ComVisible(false)]
48 50
49// The assembly version has following format : 51// The assembly version has following format :
50// 52//
@@ -53,4 +55,4 @@ using System.Runtime.InteropServices;
53// You can specify all values by your own or you can build default build and revision 55// You can specify all values by your own or you can build default build and revision
54// numbers with the '*' character (the default): 56// numbers with the '*' character (the default):
55 57
56[assembly: AssemblyVersion("1.0.*")] 58[assembly : AssemblyVersion("1.0.*")] \ No newline at end of file
diff --git a/OpenSim/Framework/Console/ConsoleCallbacksBase.cs b/OpenSim/Framework/Console/ConsoleCallbacksBase.cs
index e079202..8eea702 100644
--- a/OpenSim/Framework/Console/ConsoleCallbacksBase.cs
+++ b/OpenSim/Framework/Console/ConsoleCallbacksBase.cs
@@ -26,10 +26,10 @@
26* 26*
27*/ 27*/
28namespace OpenSim.Framework.Console 28namespace OpenSim.Framework.Console
29{ 29{
30 public interface conscmd_callback 30 public interface conscmd_callback
31 { 31 {
32 void RunCmd(string cmd, string[] cmdparams); 32 void RunCmd(string cmd, string[] cmdparams);
33 void Show(string ShowWhat); 33 void Show(string ShowWhat);
34 } 34 }
35} 35} \ No newline at end of file
diff --git a/OpenSim/Framework/Console/LogBase.cs b/OpenSim/Framework/Console/LogBase.cs
index c976e2c..6651e5d 100644
--- a/OpenSim/Framework/Console/LogBase.cs
+++ b/OpenSim/Framework/Console/LogBase.cs
@@ -26,10 +26,10 @@
26* 26*
27*/ 27*/
28using System; 28using System;
29using System.Collections.Generic;
30using System.Diagnostics;
29using System.IO; 31using System.IO;
30using System.Net; 32using System.Net;
31using System.Diagnostics;
32using System.Collections.Generic;
33 33
34namespace OpenSim.Framework.Console 34namespace OpenSim.Framework.Console
35{ 35{
@@ -48,7 +48,7 @@ namespace OpenSim.Framework.Console
48 { 48 {
49 private object m_syncRoot = new object(); 49 private object m_syncRoot = new object();
50 50
51 StreamWriter Log; 51 private StreamWriter Log;
52 public conscmd_callback cmdparser; 52 public conscmd_callback cmdparser;
53 public string componentname; 53 public string componentname;
54 private bool m_verbose; 54 private bool m_verbose;
@@ -57,7 +57,7 @@ namespace OpenSim.Framework.Console
57 { 57 {
58 this.componentname = componentname; 58 this.componentname = componentname;
59 this.cmdparser = cmdparser; 59 this.cmdparser = cmdparser;
60 this.m_verbose = verbose; 60 m_verbose = verbose;
61 System.Console.WriteLine("Creating new local console"); 61 System.Console.WriteLine("Creating new local console");
62 62
63 if (String.IsNullOrEmpty(LogFile)) 63 if (String.IsNullOrEmpty(LogFile))
@@ -87,8 +87,8 @@ namespace OpenSim.Framework.Console
87 /// <returns>an ansii color</returns> 87 /// <returns>an ansii color</returns>
88 private ConsoleColor DeriveColor(string input) 88 private ConsoleColor DeriveColor(string input)
89 { 89 {
90 int colIdx = (input.ToUpper().GetHashCode() % 6) + 9; 90 int colIdx = (input.ToUpper().GetHashCode()%6) + 9;
91 return (ConsoleColor)colIdx; 91 return (ConsoleColor) colIdx;
92 } 92 }
93 93
94 /// <summary> 94 /// <summary>
@@ -236,7 +236,7 @@ namespace OpenSim.Framework.Console
236 { 236 {
237 lock (m_syncRoot) 237 lock (m_syncRoot)
238 { 238 {
239 string now = System.DateTime.Now.ToString("[MM-dd hh:mm:ss] "); 239 string now = DateTime.Now.ToString("[MM-dd hh:mm:ss] ");
240 Log.Write(now); 240 Log.Write(now);
241 Log.WriteLine(format, args); 241 Log.WriteLine(format, args);
242 Log.Flush(); 242 Log.Flush();
@@ -306,7 +306,7 @@ namespace OpenSim.Framework.Console
306 public int Read() 306 public int Read()
307 { 307 {
308 int TempInt = System.Console.Read(); 308 int TempInt = System.Console.Read();
309 Log.Write((char)TempInt); 309 Log.Write((char) TempInt);
310 return TempInt; 310 return TempInt;
311 } 311 }
312 312
@@ -359,7 +359,7 @@ namespace OpenSim.Framework.Console
359 { 359 {
360 // FIXME: Needs to be better abstracted 360 // FIXME: Needs to be better abstracted
361 Log.WriteLine(prompt); 361 Log.WriteLine(prompt);
362 this.Notice(prompt); 362 Notice(prompt);
363 ConsoleColor oldfg = System.Console.ForegroundColor; 363 ConsoleColor oldfg = System.Console.ForegroundColor;
364 System.Console.ForegroundColor = System.Console.BackgroundColor; 364 System.Console.ForegroundColor = System.Console.BackgroundColor;
365 string temp = System.Console.ReadLine(); 365 string temp = System.Console.ReadLine();
@@ -370,8 +370,8 @@ namespace OpenSim.Framework.Console
370 // Displays a command prompt and waits for the user to enter a string, then returns that string 370 // Displays a command prompt and waits for the user to enter a string, then returns that string
371 public string CmdPrompt(string prompt) 371 public string CmdPrompt(string prompt)
372 { 372 {
373 this.Notice(String.Format("{0}: ", prompt)); 373 Notice(String.Format("{0}: ", prompt));
374 return this.ReadLine(); 374 return ReadLine();
375 } 375 }
376 376
377 // Displays a command prompt and returns a default value if the user simply presses enter 377 // Displays a command prompt and returns a default value if the user simply presses enter
@@ -423,8 +423,7 @@ namespace OpenSim.Framework.Console
423 423
424 public void MainLogPrompt() 424 public void MainLogPrompt()
425 { 425 {
426 426 string tempstr = CmdPrompt(componentname + "# ");
427 string tempstr = this.CmdPrompt(this.componentname + "# ");
428 MainLogRunCommand(tempstr); 427 MainLogRunCommand(tempstr);
429 } 428 }
430 429
@@ -436,7 +435,7 @@ namespace OpenSim.Framework.Console
436 Array.Reverse(tempstrarray); 435 Array.Reverse(tempstrarray);
437 Array.Resize<string>(ref tempstrarray, tempstrarray.Length - 1); 436 Array.Resize<string>(ref tempstrarray, tempstrarray.Length - 1);
438 Array.Reverse(tempstrarray); 437 Array.Reverse(tempstrarray);
439 string[] cmdparams = (string[])tempstrarray; 438 string[] cmdparams = (string[]) tempstrarray;
440 try 439 try
441 { 440 {
442 RunCmd(cmd, cmdparams); 441 RunCmd(cmd, cmdparams);
@@ -454,7 +453,7 @@ namespace OpenSim.Framework.Console
454 string result = String.Empty; 453 string result = String.Empty;
455 454
456 string stacktrace = Environment.StackTrace; 455 string stacktrace = Environment.StackTrace;
457 List<string> lines = new List<string>(stacktrace.Split(new string[] { "at " }, StringSplitOptions.None)); 456 List<string> lines = new List<string>(stacktrace.Split(new string[] {"at "}, StringSplitOptions.None));
458 457
459 if (lines.Count > 4) 458 if (lines.Count > 4)
460 { 459 {
@@ -481,4 +480,4 @@ namespace OpenSim.Framework.Console
481 } 480 }
482 } 481 }
483 } 482 }
484} 483} \ No newline at end of file
diff --git a/OpenSim/Framework/Console/MainLog.cs b/OpenSim/Framework/Console/MainLog.cs
index 5c1a257..adf566c 100644
--- a/OpenSim/Framework/Console/MainLog.cs
+++ b/OpenSim/Framework/Console/MainLog.cs
@@ -27,15 +27,14 @@
27*/ 27*/
28namespace OpenSim.Framework.Console 28namespace OpenSim.Framework.Console
29{ 29{
30 public class MainLog { 30 public class MainLog
31 31 {
32 private static LogBase instance; 32 private static LogBase instance;
33 33
34 public static LogBase Instance 34 public static LogBase Instance
35 { 35 {
36 get { return instance; } 36 get { return instance; }
37 set { instance = value; } 37 set { instance = value; }
38 } 38 }
39 } 39 }
40 40} \ No newline at end of file
41}