From 67e12b95ea7b68f4904a7484d77ecfd787d16d0c Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Tue, 30 Oct 2007 09:05:31 +0000 Subject: * Optimized usings * Shortened type references * Removed redundant 'this' qualifier --- OpenSim/Framework/Console/AssemblyInfo.cs | 22 ++++++++-------- OpenSim/Framework/Console/ConsoleCallbacksBase.cs | 4 +-- OpenSim/Framework/Console/LogBase.cs | 31 +++++++++++------------ OpenSim/Framework/Console/MainLog.cs | 11 ++++---- 4 files changed, 34 insertions(+), 34 deletions(-) (limited to 'OpenSim/Framework/Console') 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 @@ */ using System.Reflection; using System.Runtime.InteropServices; + // Information about this assembly is defined by the following // attributes. // // change them to the information which is associated with the assembly // you compile. -[assembly: AssemblyTitle("ServerConsole")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ServerConsole")] -[assembly: AssemblyCopyright("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] +[assembly : AssemblyTitle("ServerConsole")] +[assembly : AssemblyDescription("")] +[assembly : AssemblyConfiguration("")] +[assembly : AssemblyCompany("")] +[assembly : AssemblyProduct("ServerConsole")] +[assembly : AssemblyCopyright("")] +[assembly : AssemblyTrademark("")] +[assembly : AssemblyCulture("")] // This sets the default COM visibility of types in the assembly to invisible. // If you need to expose a type to COM, use [ComVisible(true)] on that type. -[assembly: ComVisible(false)] + +[assembly : ComVisible(false)] // The assembly version has following format : // @@ -53,4 +55,4 @@ using System.Runtime.InteropServices; // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): -[assembly: AssemblyVersion("1.0.*")] +[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 @@ * */ namespace OpenSim.Framework.Console -{ +{ public interface conscmd_callback { void RunCmd(string cmd, string[] cmdparams); void Show(string ShowWhat); } -} +} \ 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 @@ * */ using System; +using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Net; -using System.Diagnostics; -using System.Collections.Generic; namespace OpenSim.Framework.Console { @@ -48,7 +48,7 @@ namespace OpenSim.Framework.Console { private object m_syncRoot = new object(); - StreamWriter Log; + private StreamWriter Log; public conscmd_callback cmdparser; public string componentname; private bool m_verbose; @@ -57,7 +57,7 @@ namespace OpenSim.Framework.Console { this.componentname = componentname; this.cmdparser = cmdparser; - this.m_verbose = verbose; + m_verbose = verbose; System.Console.WriteLine("Creating new local console"); if (String.IsNullOrEmpty(LogFile)) @@ -87,8 +87,8 @@ namespace OpenSim.Framework.Console /// an ansii color private ConsoleColor DeriveColor(string input) { - int colIdx = (input.ToUpper().GetHashCode() % 6) + 9; - return (ConsoleColor)colIdx; + int colIdx = (input.ToUpper().GetHashCode()%6) + 9; + return (ConsoleColor) colIdx; } /// @@ -236,7 +236,7 @@ namespace OpenSim.Framework.Console { lock (m_syncRoot) { - string now = System.DateTime.Now.ToString("[MM-dd hh:mm:ss] "); + string now = DateTime.Now.ToString("[MM-dd hh:mm:ss] "); Log.Write(now); Log.WriteLine(format, args); Log.Flush(); @@ -306,7 +306,7 @@ namespace OpenSim.Framework.Console public int Read() { int TempInt = System.Console.Read(); - Log.Write((char)TempInt); + Log.Write((char) TempInt); return TempInt; } @@ -359,7 +359,7 @@ namespace OpenSim.Framework.Console { // FIXME: Needs to be better abstracted Log.WriteLine(prompt); - this.Notice(prompt); + Notice(prompt); ConsoleColor oldfg = System.Console.ForegroundColor; System.Console.ForegroundColor = System.Console.BackgroundColor; string temp = System.Console.ReadLine(); @@ -370,8 +370,8 @@ namespace OpenSim.Framework.Console // Displays a command prompt and waits for the user to enter a string, then returns that string public string CmdPrompt(string prompt) { - this.Notice(String.Format("{0}: ", prompt)); - return this.ReadLine(); + Notice(String.Format("{0}: ", prompt)); + return ReadLine(); } // Displays a command prompt and returns a default value if the user simply presses enter @@ -423,8 +423,7 @@ namespace OpenSim.Framework.Console public void MainLogPrompt() { - - string tempstr = this.CmdPrompt(this.componentname + "# "); + string tempstr = CmdPrompt(componentname + "# "); MainLogRunCommand(tempstr); } @@ -436,7 +435,7 @@ namespace OpenSim.Framework.Console Array.Reverse(tempstrarray); Array.Resize(ref tempstrarray, tempstrarray.Length - 1); Array.Reverse(tempstrarray); - string[] cmdparams = (string[])tempstrarray; + string[] cmdparams = (string[]) tempstrarray; try { RunCmd(cmd, cmdparams); @@ -454,7 +453,7 @@ namespace OpenSim.Framework.Console string result = String.Empty; string stacktrace = Environment.StackTrace; - List lines = new List(stacktrace.Split(new string[] { "at " }, StringSplitOptions.None)); + List lines = new List(stacktrace.Split(new string[] {"at "}, StringSplitOptions.None)); if (lines.Count > 4) { @@ -481,4 +480,4 @@ namespace OpenSim.Framework.Console } } } -} +} \ 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 @@ */ namespace OpenSim.Framework.Console { - public class MainLog { - + public class MainLog + { private static LogBase instance; - - public static LogBase Instance + + public static LogBase Instance { get { return instance; } set { instance = value; } } } - -} +} \ No newline at end of file -- cgit v1.1