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). --- .../Common/ScriptEngineBase/AppDomainManager.cs | 1 - .../Common/ScriptEngineBase/AsyncCommandManager.cs | 19 +++++++------------ .../AsyncCommandPlugins/HttpRequest.cs | 8 -------- .../ScriptEngineBase/AsyncCommandPlugins/Listener.cs | 8 -------- .../AsyncCommandPlugins/SensorRepeat.cs | 7 +------ .../ScriptEngineBase/AsyncCommandPlugins/Timer.cs | 6 ------ .../AsyncCommandPlugins/XmlRequest.cs | 7 ------- .../Common/ScriptEngineBase/EventManager.cs | 2 +- .../Common/ScriptEngineBase/EventQueueManager.cs | 3 --- .../Common/ScriptEngineBase/EventQueueThreadClass.cs | 5 +---- .../Common/ScriptEngineBase/MaintenanceThread.cs | 7 +++---- .../Common/ScriptEngineBase/ScriptEngine.cs | 12 +++++------- .../Common/ScriptEngineBase/ScriptManager.cs | 6 ++---- .../ScriptEngineBase/iScriptEngineFunctionModule.cs | 4 ---- 14 files changed, 20 insertions(+), 75 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase') diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AppDomainManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AppDomainManager.cs index 41100c9..262d75f 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AppDomainManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AppDomainManager.cs @@ -29,7 +29,6 @@ using System; using System.Collections; using System.Collections.Generic; using System.Reflection; -using OpenSim.Region.ScriptEngine.Common; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase { diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs index a1bb5c9..7dad7ee 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs @@ -25,16 +25,11 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; using System.Collections; -using System.Collections.Generic; using System.Threading; using libsecondlife; -using Axiom.Math; -using OpenSim.Region.Environment.Interfaces; -using OpenSim.Region.Environment.Modules; -using OpenSim.Region.Environment.Scenes; using OpenSim.Framework; +using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins; using Timer=OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins.Timer; @@ -50,11 +45,11 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase public ScriptEngine m_ScriptEngine; - public AsyncCommandPlugins.Timer m_Timer; - public AsyncCommandPlugins.HttpRequest m_HttpRequest; - public AsyncCommandPlugins.Listener m_Listener; - public AsyncCommandPlugins.SensorRepeat m_SensorRepeat; - public AsyncCommandPlugins.XmlRequest m_XmlRequest; + public Timer m_Timer; + public HttpRequest m_HttpRequest; + public Listener m_Listener; + public SensorRepeat m_SensorRepeat; + public XmlRequest m_XmlRequest; public AsyncCommandManager(ScriptEngine _ScriptEngine) { @@ -81,7 +76,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase cmdHandlerThread.Priority = ThreadPriority.BelowNormal; cmdHandlerThread.IsBackground = true; cmdHandlerThread.Start(); - OpenSim.Framework.ThreadTracker.Add(cmdHandlerThread); + ThreadTracker.Add(cmdHandlerThread); } } diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs index d62734f..521402e 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs @@ -26,16 +26,8 @@ */ using System; -using System.Collections; -using System.Collections.Generic; -using System.Threading; -using libsecondlife; -using Axiom.Math; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Modules; -using OpenSim.Region.Environment.Scenes; -using OpenSim.Framework; -using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins { diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Listener.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Listener.cs index 00cbd8c..874a905 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Listener.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Listener.cs @@ -25,16 +25,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Threading; -using libsecondlife; -using Axiom.Math; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Modules; -using OpenSim.Region.Environment.Scenes; -using OpenSim.Framework; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins { diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs index fd8dbd1..71ae80c 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs @@ -26,15 +26,10 @@ */ using System; -using System.Collections; using System.Collections.Generic; -using System.Threading; using libsecondlife; -using Axiom.Math; -using OpenSim.Region.Environment.Interfaces; -using OpenSim.Region.Environment.Modules; -using OpenSim.Region.Environment.Scenes; using OpenSim.Framework; +using OpenSim.Region.Environment.Scenes; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins { diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs index 63a8d19..141e471 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs @@ -28,13 +28,7 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Threading; using libsecondlife; -using Axiom.Math; -using OpenSim.Region.Environment.Interfaces; -using OpenSim.Region.Environment.Modules; -using OpenSim.Region.Environment.Scenes; -using OpenSim.Framework; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins { diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs index be4f418..c3e1804 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs @@ -26,15 +26,8 @@ */ using System; -using System.Collections; -using System.Collections.Generic; -using System.Threading; -using libsecondlife; -using Axiom.Math; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Modules; -using OpenSim.Region.Environment.Scenes; -using OpenSim.Framework; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins { diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs index 2f2b384..b4789a9 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs @@ -35,7 +35,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase /// Prepares events so they can be directly executed upon a script by EventQueueManager, then queues it. /// [Serializable] - public class EventManager : OpenSim.Region.ScriptEngine.Common.ScriptServerInterfaces.RemoteEvents, iScriptEngineFunctionModule + public class EventManager : ScriptServerInterfaces.RemoteEvents, iScriptEngineFunctionModule { // // Class is instanced in "ScriptEngine" and Uses "EventQueueManager" that is also instanced in "ScriptEngine". diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs index cd03699..7cbbd4f 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs @@ -28,10 +28,7 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Threading; using libsecondlife; -using OpenSim.Framework; -using OpenSim.Region.Environment.Scenes.Scripting; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase { diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs index b8d950a..d77f698 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs @@ -27,11 +27,8 @@ using System; using System.Collections; -using System.Collections.Generic; -using System.Text; using System.Threading; using libsecondlife; -using Nini.Config; using OpenSim.Framework; using OpenSim.Region.Environment.Scenes.Scripting; @@ -123,7 +120,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase EventQueueThread.Priority = MyThreadPriority; EventQueueThread.Name = "EventQueueManagerThread_" + ThreadCount; EventQueueThread.Start(); - OpenSim.Framework.ThreadTracker.Add(EventQueueThread); + ThreadTracker.Add(EventQueueThread); // Look at this... Don't you wish everyone did that solid coding everywhere? :P if (ThreadCount == int.MaxValue) diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs index ad41e5b..2bf0e41 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs @@ -27,9 +27,8 @@ using System; using System.Collections; -using System.Collections.Generic; -using System.Text; using System.Threading; +using OpenSim.Framework; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase { @@ -94,7 +93,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase MaintenanceThreadThread.Name = "ScriptMaintenanceThread"; MaintenanceThreadThread.IsBackground = true; MaintenanceThreadThread.Start(); - OpenSim.Framework.ThreadTracker.Add(MaintenanceThreadThread); + ThreadTracker.Add(MaintenanceThreadThread); } } @@ -144,7 +143,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase { while (true) { - System.Threading.Thread.Sleep(MaintenanceLoopms); // Sleep before next pass + Thread.Sleep(MaintenanceLoopms); // Sleep before next pass // Reset counters? if (MaintenanceLoopTicks_ScriptLoadUnload_ResetCount) diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs index 02e49a2..a7ad50d 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs @@ -27,13 +27,11 @@ using System; using System.Collections.Generic; -using System.IO; +using System.Reflection; +using log4net; using Nini.Config; -using OpenSim.Framework.Console; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; -using OpenSim.Region.ScriptEngine.Common; -using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase { @@ -42,9 +40,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase /// /// [Serializable] - public abstract class ScriptEngine : IRegionModule, OpenSim.Region.ScriptEngine.Common.ScriptServerInterfaces.ScriptEngine, iScriptEngineFunctionModule + public abstract class ScriptEngine : IRegionModule, ScriptServerInterfaces.ScriptEngine, iScriptEngineFunctionModule { - 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); public static List ScriptEngines = new List(); public Scene World; @@ -75,7 +73,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase public abstract ScriptManager _GetScriptManager(); - public log4net.ILog Log + public ILog Log { get { return m_log; } } diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs index 09f84d6..cd2e530 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs @@ -32,9 +32,7 @@ using System.Reflection; using System.Runtime.Serialization.Formatters.Binary; using System.Threading; using libsecondlife; -using OpenSim.Framework; using OpenSim.Region.Environment.Scenes; -using OpenSim.Region.ScriptEngine.Common; namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase { @@ -106,9 +104,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase #region Object init/shutdown - public ScriptEngineBase.ScriptEngine m_scriptEngine; + public ScriptEngine m_scriptEngine; - public ScriptManager(ScriptEngineBase.ScriptEngine scriptEngine) + public ScriptManager(ScriptEngine scriptEngine) { m_scriptEngine = scriptEngine; } diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/iScriptEngineFunctionModule.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/iScriptEngineFunctionModule.cs index 4e037b3..768ba6d 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/iScriptEngineFunctionModule.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/iScriptEngineFunctionModule.cs @@ -25,10 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; -using System.Collections.Generic; -using System.Text; - namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase { public interface iScriptEngineFunctionModule -- cgit v1.1