From fef3b3689492dea63693c964bcdbec9f5137eb5e Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Mon, 21 Apr 2008 07:09:17 +0000 Subject: * Optimised using statements and namespace references across entire project (this took a while to run). --- OpenSim/TestSuite/BotManager.cs | 13 ++++++------- OpenSim/TestSuite/Main.cs | 10 +--------- OpenSim/TestSuite/PhysicsBot.cs | 15 ++++++--------- OpenSim/TestSuite/Util.cs | 2 +- 4 files changed, 14 insertions(+), 26 deletions(-) (limited to 'OpenSim/TestSuite') diff --git a/OpenSim/TestSuite/BotManager.cs b/OpenSim/TestSuite/BotManager.cs index c867cae..ec71973 100644 --- a/OpenSim/TestSuite/BotManager.cs +++ b/OpenSim/TestSuite/BotManager.cs @@ -27,12 +27,11 @@ using System; using System.Collections.Generic; -using System.Text; -using System.IO; +using System.Reflection; +using System.Threading; using libsecondlife; -using libsecondlife.Packets; +using log4net; using Nini.Config; -using System.Threading; using OpenSim.Framework; using OpenSim.Framework.Console; @@ -43,13 +42,13 @@ namespace OpenSim.TestSuite /// public class BotManager : conscmd_callback { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); protected ConsoleBase m_console; protected List m_lBot; protected Thread[] m_td; protected bool m_verbose = true; - protected Random somthing = new Random(System.Environment.TickCount); + protected Random somthing = new Random(Environment.TickCount); protected int numbots = 0; protected IConfig Previous_config; @@ -118,7 +117,7 @@ namespace OpenSim.TestSuite m_td[pos].IsBackground = true; m_td[pos].Start(); m_lBot.Add(pb); - OpenSim.Framework.ThreadTracker.Add(m_td[pos]); + ThreadTracker.Add(m_td[pos]); } /// diff --git a/OpenSim/TestSuite/Main.cs b/OpenSim/TestSuite/Main.cs index ff4965c..213f02c 100644 --- a/OpenSim/TestSuite/Main.cs +++ b/OpenSim/TestSuite/Main.cs @@ -26,15 +26,7 @@ */ using System; -using System.Collections.Generic; -using System.Text; -using libsecondlife; -using libsecondlife.Packets; using Nini.Config; -using log4net; -using log4net.Config; -using System.Threading; -using OpenSim.Framework.Console; namespace OpenSim.TestSuite { @@ -89,7 +81,7 @@ namespace OpenSim.TestSuite private static void Help() { - System.Console.WriteLine( + Console.WriteLine( "usage: pCampBot <-loginuri loginuri> [OPTIONS]\n" + "Spawns a set of bots to test an OpenSim region\n\n" + " -l, -loginuri loginuri for sim to log into (required)\n" + diff --git a/OpenSim/TestSuite/PhysicsBot.cs b/OpenSim/TestSuite/PhysicsBot.cs index 792465f..3d6b54c 100644 --- a/OpenSim/TestSuite/PhysicsBot.cs +++ b/OpenSim/TestSuite/PhysicsBot.cs @@ -26,17 +26,14 @@ */ using System; -using System.Collections.Generic; using System.IO; -using System.Text; +using System.Threading; +using System.Timers; using libsecondlife; -using libsecondlife.Packets; using Nini.Config; -using System.Threading; using OpenSim.Framework; using OpenSim.Framework.Console; -using Timer = System.Timers.Timer; -using log4net; +using Timer=System.Timers.Timer; namespace OpenSim.TestSuite { @@ -55,7 +52,7 @@ namespace OpenSim.TestSuite protected Timer m_action; // Action Timer - protected Random somthing = new Random(System.Environment.TickCount);// We do stuff randomly here + protected Random somthing = new Random(Environment.TickCount);// We do stuff randomly here //New instance of a SecondLife client @@ -76,7 +73,7 @@ namespace OpenSim.TestSuite //We do our actions here. This is where one would //add additional steps and/or things the bot should do - void m_action_Elapsed(object sender, System.Timers.ElapsedEventArgs e) + void m_action_Elapsed(object sender, ElapsedEventArgs e) { //client.Throttle.Task = 500000f; //client.Throttle.Set(); @@ -147,7 +144,7 @@ namespace OpenSim.TestSuite if (OnConnected != null) { m_action = new Timer(somthing.Next(1000, 10000)); - m_action.Elapsed += new System.Timers.ElapsedEventHandler(m_action_Elapsed); + m_action.Elapsed += new ElapsedEventHandler(m_action_Elapsed); m_action.Start(); OnConnected(this, EventType.CONNECTED); client.Self.Jump(); diff --git a/OpenSim/TestSuite/Util.cs b/OpenSim/TestSuite/Util.cs index a2b6d1c..c82391b 100644 --- a/OpenSim/TestSuite/Util.cs +++ b/OpenSim/TestSuite/Util.cs @@ -59,7 +59,7 @@ namespace OpenSim.TestSuite private static void TestResult(Result r, String msg) { - System.Console.WriteLine("[{0}]: {1}", ResultToString(r), msg); + Console.WriteLine("[{0}]: {1}", ResultToString(r), msg); } public static void TestFail(String msg) -- cgit v1.1