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/Grid/AssetServer/Main.cs | 6 ++++-- OpenSim/Grid/AssetServer/RestService.cs | 7 ++++--- OpenSim/Grid/GridServer/GridManager.cs | 10 +++++----- OpenSim/Grid/GridServer/GridServerBase.cs | 7 ++----- OpenSim/Grid/GridServer/Program.cs | 6 ++---- OpenSim/Grid/InventoryServer/GridInventoryService.cs | 10 ++++------ OpenSim/Grid/InventoryServer/InventoryManager.cs | 4 ++-- OpenSim/Grid/InventoryServer/Main.cs | 7 +++++-- OpenSim/Grid/MessagingServer/Main.cs | 9 +++++---- OpenSim/Grid/MessagingServer/MessageService.cs | 14 ++++++-------- OpenSim/Grid/MessagingServer/PresenceInformer.cs | 13 +++---------- OpenSim/Grid/MessagingServer/UserPresenceData.cs | 3 +-- OpenSim/Grid/MessagingServer/WorkUnitBase.cs | 4 ---- OpenSim/Grid/MessagingServer/WorkUnitPresenceUpdate.cs | 4 ---- OpenSim/Grid/MessagingServer/XMPPHTTPService.cs | 11 ++++------- OpenSim/Grid/ScriptServer/Application.cs | 3 ++- OpenSim/Grid/ScriptServer/FakeScene.cs | 3 --- OpenSim/Grid/ScriptServer/RemotingObject.cs | 3 --- OpenSim/Grid/ScriptServer/RemotingServer.cs | 4 ---- .../ScriptServer/Region/RegionConnectionManager.cs | 2 -- .../Grid/ScriptServer/ScriptServer/RegionCommManager.cs | 4 ++-- .../ScriptServer/ScriptServer/ScriptEngineLoader.cs | 4 ++-- .../ScriptServer/ScriptServer/ScriptEnginesManager.cs | 1 - OpenSim/Grid/ScriptServer/ScriptServerMain.cs | 10 +++++----- OpenSim/Grid/UserServer/Main.cs | 10 +++++++--- OpenSim/Grid/UserServer/MessageServersConnector.cs | 15 ++++++--------- OpenSim/Grid/UserServer/UserLoginService.cs | 11 ++++------- OpenSim/Grid/UserServer/UserManager.cs | 17 +++++++++-------- 28 files changed, 84 insertions(+), 118 deletions(-) (limited to 'OpenSim/Grid') diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs index 3a38e85..5a013b9 100644 --- a/OpenSim/Grid/AssetServer/Main.cs +++ b/OpenSim/Grid/AssetServer/Main.cs @@ -29,6 +29,8 @@ using System; using System.IO; using System.Reflection; using libsecondlife; +using log4net; +using log4net.Config; using OpenSim.Framework; using OpenSim.Framework.AssetLoader.Filesystem; using OpenSim.Framework.Console; @@ -42,7 +44,7 @@ namespace OpenSim.Grid.AssetServer /// public class OpenAsset_Main : BaseOpenSimServer, 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); public AssetConfig m_config; @@ -56,7 +58,7 @@ namespace OpenSim.Grid.AssetServer [STAThread] public static void Main(string[] args) { - log4net.Config.XmlConfigurator.Configure(); + XmlConfigurator.Configure(); m_log.Info("Starting...\n"); diff --git a/OpenSim/Grid/AssetServer/RestService.cs b/OpenSim/Grid/AssetServer/RestService.cs index ae56a68..ece826e 100644 --- a/OpenSim/Grid/AssetServer/RestService.cs +++ b/OpenSim/Grid/AssetServer/RestService.cs @@ -27,12 +27,13 @@ using System; using System.IO; +using System.Reflection; using System.Text; using System.Xml; using System.Xml.Serialization; using libsecondlife; +using log4net; using OpenSim.Framework; -using OpenSim.Framework.Console; using OpenSim.Framework.Servers; using OpenSim.Framework.Statistics; @@ -40,7 +41,7 @@ namespace OpenSim.Grid.AssetServer { public class GetAssetStreamHandler : BaseStreamHandler { - 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); private OpenAsset_Main m_assetManager; private IAssetProvider m_assetProvider; @@ -115,7 +116,7 @@ namespace OpenSim.Grid.AssetServer public class PostAssetStreamHandler : BaseStreamHandler { - 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); private OpenAsset_Main m_assetManager; private IAssetProvider m_assetProvider; diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs index ba526c0..ee2f129 100644 --- a/OpenSim/Grid/GridServer/GridManager.cs +++ b/OpenSim/Grid/GridServer/GridManager.cs @@ -31,18 +31,18 @@ using System.Collections.Generic; using System.Reflection; using System.Xml; using libsecondlife; +using log4net; using Nwc.XmlRpc; -using OpenSim.Framework; -using OpenSim.Framework.Console; using OpenSim.Data; -using OpenSim.Framework.Servers; using OpenSim.Data.MySQL; +using OpenSim.Framework; +using OpenSim.Framework.Servers; namespace OpenSim.Grid.GridServer { public class GridManager { - 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); private Dictionary _plugins = new Dictionary(); private Dictionary _logplugins = new Dictionary(); @@ -630,7 +630,7 @@ namespace OpenSim.Grid.GridServer //OpenSim.Data.MySQL.MySQLGridData dbengine = new OpenSim.Data.MySQL.MySQLGridData(); try { - OpenSim.Data.MySQL.MySQLGridData mysqldata = (OpenSim.Data.MySQL.MySQLGridData)(kvp.Value); + MySQLGridData mysqldata = (MySQLGridData)(kvp.Value); //DataResponse insertResponse = mysqldata.DeleteProfile(TheSim); DataResponse insertResponse = mysqldata.DeleteProfile(uuid); switch (insertResponse) diff --git a/OpenSim/Grid/GridServer/GridServerBase.cs b/OpenSim/Grid/GridServer/GridServerBase.cs index 3be98d8..2feaac3 100644 --- a/OpenSim/Grid/GridServer/GridServerBase.cs +++ b/OpenSim/Grid/GridServer/GridServerBase.cs @@ -26,16 +26,13 @@ */ using System; +using System.Collections.Generic; using System.IO; using System.Timers; -using System.Collections; -using System.Collections.Generic; +using Mono.Addins; using OpenSim.Framework; using OpenSim.Framework.Console; using OpenSim.Framework.Servers; -using Nwc.XmlRpc; -using Mono.Addins; -using Mono.Addins.Description; namespace OpenSim.Grid.GridServer { diff --git a/OpenSim/Grid/GridServer/Program.cs b/OpenSim/Grid/GridServer/Program.cs index b95e422..6eb4e15 100644 --- a/OpenSim/Grid/GridServer/Program.cs +++ b/OpenSim/Grid/GridServer/Program.cs @@ -26,9 +26,7 @@ */ using System; -using System.Collections.Generic; -using System.Text; -using OpenSim.Framework.Console; +using log4net.Config; namespace OpenSim.Grid.GridServer { @@ -37,7 +35,7 @@ namespace OpenSim.Grid.GridServer [STAThread] public static void Main(string[] args) { - log4net.Config.XmlConfigurator.Configure(); + XmlConfigurator.Configure(); GridServerBase app = new GridServerBase(); diff --git a/OpenSim/Grid/InventoryServer/GridInventoryService.cs b/OpenSim/Grid/InventoryServer/GridInventoryService.cs index f7c9828..82ba7df 100644 --- a/OpenSim/Grid/InventoryServer/GridInventoryService.cs +++ b/OpenSim/Grid/InventoryServer/GridInventoryService.cs @@ -27,13 +27,11 @@ using System; using System.Collections.Generic; -using System.Threading; - +using System.Reflection; using libsecondlife; - +using log4net; using OpenSim.Framework; using OpenSim.Framework.Communications; -using OpenSim.Framework.Console; namespace OpenSim.Grid.InventoryServer { @@ -42,8 +40,8 @@ namespace OpenSim.Grid.InventoryServer /// public class GridInventoryService : InventoryServiceBase { - 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 override void RequestInventoryForUser(LLUUID userID, InventoryReceiptCallback callback) { diff --git a/OpenSim/Grid/InventoryServer/InventoryManager.cs b/OpenSim/Grid/InventoryServer/InventoryManager.cs index ed154a8..b3c6891 100644 --- a/OpenSim/Grid/InventoryServer/InventoryManager.cs +++ b/OpenSim/Grid/InventoryServer/InventoryManager.cs @@ -32,15 +32,15 @@ using System.Text; using System.Xml; using System.Xml.Serialization; using libsecondlife; +using log4net; using OpenSim.Framework; -using OpenSim.Framework.Console; using OpenSim.Framework.Servers; namespace OpenSim.Grid.InventoryServer { public class InventoryManager { - 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); private IInventoryData _databasePlugin; diff --git a/OpenSim/Grid/InventoryServer/Main.cs b/OpenSim/Grid/InventoryServer/Main.cs index 3987334..2454650 100644 --- a/OpenSim/Grid/InventoryServer/Main.cs +++ b/OpenSim/Grid/InventoryServer/Main.cs @@ -28,7 +28,10 @@ using System; using System.Collections.Generic; using System.IO; +using System.Reflection; using libsecondlife; +using log4net; +using log4net.Config; using OpenSim.Framework; using OpenSim.Framework.Console; using OpenSim.Framework.Servers; @@ -37,7 +40,7 @@ namespace OpenSim.Grid.InventoryServer { public class OpenInventory_Main : BaseOpenSimServer, 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); private InventoryManager m_inventoryManager; private InventoryConfig m_config; @@ -48,7 +51,7 @@ namespace OpenSim.Grid.InventoryServer [STAThread] public static void Main(string[] args) { - log4net.Config.XmlConfigurator.Configure(); + XmlConfigurator.Configure(); OpenInventory_Main theServer = new OpenInventory_Main(); theServer.Startup(); diff --git a/OpenSim/Grid/MessagingServer/Main.cs b/OpenSim/Grid/MessagingServer/Main.cs index b288b33..bf793bf 100644 --- a/OpenSim/Grid/MessagingServer/Main.cs +++ b/OpenSim/Grid/MessagingServer/Main.cs @@ -26,11 +26,12 @@ */ using System; -using System.Collections.Generic; using System.IO; +using System.Reflection; using libsecondlife; +using log4net; +using log4net.Config; using OpenSim.Framework; -using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Console; using OpenSim.Framework.Servers; @@ -40,7 +41,7 @@ namespace OpenSim.Grid.MessagingServer /// public class OpenMessage_Main : BaseOpenSimServer, 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); private MessageServerConfig Cfg; private MessageService msgsvc; @@ -50,7 +51,7 @@ namespace OpenSim.Grid.MessagingServer [STAThread] public static void Main(string[] args) { - log4net.Config.XmlConfigurator.Configure(); + XmlConfigurator.Configure(); m_log.Info("Launching MessagingServer..."); diff --git a/OpenSim/Grid/MessagingServer/MessageService.cs b/OpenSim/Grid/MessagingServer/MessageService.cs index 1b16cb2..d824d21 100644 --- a/OpenSim/Grid/MessagingServer/MessageService.cs +++ b/OpenSim/Grid/MessagingServer/MessageService.cs @@ -26,25 +26,23 @@ */ using System; -using System.Net; -using System.Net.Sockets; using System.Collections; using System.Collections.Generic; +using System.Net; +using System.Reflection; using System.Threading; -//using System.Xml; using libsecondlife; +using log4net; using Nwc.XmlRpc; -using OpenSim.Framework; -using OpenSim.Framework.Console; using OpenSim.Data; -using OpenSim.Framework.Servers; -using FriendRights = libsecondlife.FriendRights; +using OpenSim.Framework; +//using System.Xml; namespace OpenSim.Grid.MessagingServer { public class MessageService { - 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); private MessageServerConfig m_cfg; diff --git a/OpenSim/Grid/MessagingServer/PresenceInformer.cs b/OpenSim/Grid/MessagingServer/PresenceInformer.cs index f270bbe..59d0e13 100644 --- a/OpenSim/Grid/MessagingServer/PresenceInformer.cs +++ b/OpenSim/Grid/MessagingServer/PresenceInformer.cs @@ -25,18 +25,11 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; using System.Collections; -using System.Collections.Generic; -using System.Net; -using System.Net.Sockets; -using System.Text; -using libsecondlife; +using System.Reflection; +using log4net; using Nwc.XmlRpc; -using OpenSim.Framework; -using OpenSim.Framework.Console; using OpenSim.Data; -using OpenSim.Framework.Servers; namespace OpenSim.Grid.MessagingServer { @@ -44,7 +37,7 @@ namespace OpenSim.Grid.MessagingServer { public UserPresenceData presence1 = null; public UserPresenceData presence2 = null; - 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 PresenceInformer() { diff --git a/OpenSim/Grid/MessagingServer/UserPresenceData.cs b/OpenSim/Grid/MessagingServer/UserPresenceData.cs index 4390903..7188201 100644 --- a/OpenSim/Grid/MessagingServer/UserPresenceData.cs +++ b/OpenSim/Grid/MessagingServer/UserPresenceData.cs @@ -26,11 +26,10 @@ */ using System; -using System.Collections; using System.Collections.Generic; using libsecondlife; -using OpenSim.Framework; using OpenSim.Data; +using OpenSim.Framework; namespace OpenSim.Grid.MessagingServer { diff --git a/OpenSim/Grid/MessagingServer/WorkUnitBase.cs b/OpenSim/Grid/MessagingServer/WorkUnitBase.cs index c4e6240..d25f044 100644 --- a/OpenSim/Grid/MessagingServer/WorkUnitBase.cs +++ b/OpenSim/Grid/MessagingServer/WorkUnitBase.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.Grid.MessagingServer { public class WorkUnitBase diff --git a/OpenSim/Grid/MessagingServer/WorkUnitPresenceUpdate.cs b/OpenSim/Grid/MessagingServer/WorkUnitPresenceUpdate.cs index c54b4d9..c31f0c7 100644 --- a/OpenSim/Grid/MessagingServer/WorkUnitPresenceUpdate.cs +++ b/OpenSim/Grid/MessagingServer/WorkUnitPresenceUpdate.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.Grid.MessagingServer { public class WorkUnitPresenceUpdate : WorkUnitBase diff --git a/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs b/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs index 4a66717..df3bc22 100644 --- a/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs +++ b/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs @@ -27,19 +27,16 @@ using System; using System.IO; -using System.Text; -using System.Xml; -using System.Xml.Serialization; +using System.Reflection; using libsecondlife; -using OpenSim.Framework; -using OpenSim.Framework.Console; +using log4net; using OpenSim.Framework.Servers; namespace OpenSim.Grid.MessagingServer { public class XMPPHTTPStreamHandler : BaseStreamHandler { - 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); /// @@ -85,7 +82,7 @@ namespace OpenSim.Grid.MessagingServer public class PostXMPPStreamHandler : BaseStreamHandler { - 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 override byte[] Handle(string path, Stream request) { diff --git a/OpenSim/Grid/ScriptServer/Application.cs b/OpenSim/Grid/ScriptServer/Application.cs index 5cf781f..ef93f65 100644 --- a/OpenSim/Grid/ScriptServer/Application.cs +++ b/OpenSim/Grid/ScriptServer/Application.cs @@ -26,6 +26,7 @@ */ using System; +using log4net.Config; namespace OpenSim.Grid.ScriptServer { @@ -35,7 +36,7 @@ namespace OpenSim.Grid.ScriptServer private static void Main(string[] args) { - log4net.Config.XmlConfigurator.Configure(); + XmlConfigurator.Configure(); AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); diff --git a/OpenSim/Grid/ScriptServer/FakeScene.cs b/OpenSim/Grid/ScriptServer/FakeScene.cs index bb2ff4e..480050d 100644 --- a/OpenSim/Grid/ScriptServer/FakeScene.cs +++ b/OpenSim/Grid/ScriptServer/FakeScene.cs @@ -25,9 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; -using System.Collections.Generic; -using System.Text; using OpenSim.Framework; using OpenSim.Framework.Communications; using OpenSim.Framework.Communications.Cache; diff --git a/OpenSim/Grid/ScriptServer/RemotingObject.cs b/OpenSim/Grid/ScriptServer/RemotingObject.cs index 8cdebe7..9d3065b 100644 --- a/OpenSim/Grid/ScriptServer/RemotingObject.cs +++ b/OpenSim/Grid/ScriptServer/RemotingObject.cs @@ -26,9 +26,6 @@ */ using System; -using System.Collections.Generic; -using System.Text; -using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.ScriptEngine.Common; namespace OpenSim.Grid.ScriptServer diff --git a/OpenSim/Grid/ScriptServer/RemotingServer.cs b/OpenSim/Grid/ScriptServer/RemotingServer.cs index 6d8cc19..7d0e334 100644 --- a/OpenSim/Grid/ScriptServer/RemotingServer.cs +++ b/OpenSim/Grid/ScriptServer/RemotingServer.cs @@ -25,13 +25,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; -using System.Collections.Generic; -using System.Text; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Tcp; -using OpenSim.Region.ScriptEngine.Common; namespace OpenSim.Grid.ScriptServer { diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs b/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs index a3d014d..a9679f8 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs @@ -25,8 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using OpenSim.Framework.Console; - namespace OpenSim.Grid.ScriptServer { // Maintains connection and communication to a region diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs b/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs index 6cfd6bf..c87352c 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs @@ -27,7 +27,7 @@ using System.Collections.Generic; using System.Threading; -using OpenSim.Framework.Console; +using OpenSim.Framework; namespace OpenSim.Grid.ScriptServer { @@ -61,7 +61,7 @@ namespace OpenSim.Grid.ScriptServer listenThread.Name = "ListenThread"; listenThread.IsBackground = true; listenThread.Start(); - OpenSim.Framework.ThreadTracker.Add(listenThread); + ThreadTracker.Add(listenThread); } /// diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineLoader.cs b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineLoader.cs index 6fcf5c8..4d8c559 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineLoader.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineLoader.cs @@ -28,14 +28,14 @@ using System; using System.IO; using System.Reflection; -using OpenSim.Framework.Console; +using log4net; using OpenSim.Region.ScriptEngine.Common; namespace OpenSim.Grid.ScriptServer.ScriptServer { internal class ScriptEngineLoader { - 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 ScriptServerInterfaces.ScriptEngine LoadScriptEngine(string EngineName) { diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs index 2cb46dd..9d67602 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs @@ -26,7 +26,6 @@ */ using System.Collections.Generic; -using OpenSim.Framework.Console; using OpenSim.Region.ScriptEngine.Common; namespace OpenSim.Grid.ScriptServer.ScriptServer diff --git a/OpenSim/Grid/ScriptServer/ScriptServerMain.cs b/OpenSim/Grid/ScriptServer/ScriptServerMain.cs index 12e5f1d..729d262 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServerMain.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServerMain.cs @@ -25,10 +25,10 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System.IO; +using System; +using System.Reflection; using libsecondlife; -using Nini.Config; -using OpenSim.Framework; +using log4net; using OpenSim.Framework.Console; using OpenSim.Framework.Servers; using OpenSim.Grid.ScriptServer.ScriptServer; @@ -39,7 +39,7 @@ namespace OpenSim.Grid.ScriptServer { public class ScriptServerMain : BaseOpenSimServer, 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); // // Root object. Creates objects used. @@ -77,7 +77,7 @@ namespace OpenSim.Grid.ScriptServer RPC.ReceiveCommand += new TRPC_Remote.ReceiveCommandDelegate(RPC_ReceiveCommand); m_TCPServer.StartListen(); - System.Console.ReadLine(); + Console.ReadLine(); } private void RPC_ReceiveCommand(int ID, string Command, object[] p) diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index 0f0104e..0534e3b 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs @@ -28,7 +28,11 @@ using System; using System.Collections.Generic; using System.IO; +using System.Net; +using System.Reflection; using libsecondlife; +using log4net; +using log4net.Config; using OpenSim.Framework; using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Console; @@ -41,7 +45,7 @@ namespace OpenSim.Grid.UserServer /// public class OpenUser_Main : BaseOpenSimServer, 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); private UserConfig Cfg; @@ -54,7 +58,7 @@ namespace OpenSim.Grid.UserServer [STAThread] public static void Main(string[] args) { - log4net.Config.XmlConfigurator.Configure(); + XmlConfigurator.Configure(); m_log.Info("Launching UserServer..."); @@ -191,7 +195,7 @@ namespace OpenSim.Grid.UserServer } } - catch (System.Net.WebException e) + catch (WebException e) { m_log.ErrorFormat( "[USERS]: Could not contact the inventory service at {0} to create an inventory for {1}", diff --git a/OpenSim/Grid/UserServer/MessageServersConnector.cs b/OpenSim/Grid/UserServer/MessageServersConnector.cs index 6355c4d..22505cb 100644 --- a/OpenSim/Grid/UserServer/MessageServersConnector.cs +++ b/OpenSim/Grid/UserServer/MessageServersConnector.cs @@ -25,23 +25,20 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; using System.Collections; using System.Collections.Generic; -using System.Text; -using System.Threading; +using System.Net; +using System.Reflection; using libsecondlife; +using log4net; using Nwc.XmlRpc; -using OpenSim.Framework; -using OpenSim.Framework.Communications.Cache; -using OpenSim.Framework.Console; using OpenSim.Framework.Servers; namespace OpenSim.Grid.UserServer { public class MessageServersConnector { - 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 Dictionary MessageServers; @@ -214,7 +211,7 @@ namespace OpenSim.Grid.UserServer { XmlRpcResponse GridResp = GridReq.Send(serv.URI, 6000); } - catch (System.Net.WebException) + catch (WebException) { m_log.Warn("[MSGCONNECTOR]: Unable to notify Message Server about log out. Other users might still think this user is online"); } @@ -249,7 +246,7 @@ namespace OpenSim.Grid.UserServer XmlRpcResponse GridResp = GridReq.Send(serv.URI, 6000); m_log.Info("[LOGIN]: Notified : " + serv.URI + " about user login"); } - catch (System.Net.WebException) + catch (WebException) { m_log.Warn("[MSGCONNECTOR]: Unable to notify Message Server about login. Presence might be borked for this user"); } diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index d7a3b1a..f294dcf 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs @@ -28,18 +28,15 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Threading; +using System.Reflection; using libsecondlife; +using log4net; using Nwc.XmlRpc; - +using OpenSim.Data; using OpenSim.Framework; using OpenSim.Framework.Communications.Cache; -using OpenSim.Framework.Console; -using OpenSim.Data; using OpenSim.Framework.Servers; -using OpenSim.Framework.Statistics; using OpenSim.Framework.UserManagement; -using InventoryFolder=OpenSim.Framework.InventoryFolder; namespace OpenSim.Grid.UserServer { @@ -48,7 +45,7 @@ namespace OpenSim.Grid.UserServer public class UserLoginService : LoginService { - 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 event UserLoggedInAtLocation OnUserLoggedInAtLocation; diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index 2a53d7b..aa2c959 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs @@ -28,11 +28,12 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Reflection; using System.Text.RegularExpressions; using libsecondlife; +using log4net; using Nwc.XmlRpc; using OpenSim.Framework; -using OpenSim.Framework.Statistics; using OpenSim.Framework.UserManagement; namespace OpenSim.Grid.UserServer @@ -41,7 +42,7 @@ namespace OpenSim.Grid.UserServer public class UserManager : UserManagerBase { - 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 event logOffUser OnLogOffUser; private logOffUser handlerLogOffUser = null; @@ -389,7 +390,7 @@ namespace OpenSim.Grid.UserServer { userProfile.HomeLocationX = (float)Convert.ToDecimal((string)requestData["home_pos_x"]); } - catch (System.InvalidCastException) + catch (InvalidCastException) { m_log.Error("[PROFILE]:Failed to set home postion x"); } @@ -401,7 +402,7 @@ namespace OpenSim.Grid.UserServer { userProfile.HomeLocationY = (float)Convert.ToDecimal((string)requestData["home_pos_y"]); } - catch (System.InvalidCastException) + catch (InvalidCastException) { m_log.Error("[PROFILE]:Failed to set home postion y"); } @@ -412,7 +413,7 @@ namespace OpenSim.Grid.UserServer { userProfile.HomeLocationZ = (float)Convert.ToDecimal((string)requestData["home_pos_z"]); } - catch (System.InvalidCastException) + catch (InvalidCastException) { m_log.Error("[PROFILE]:Failed to set home postion z"); } @@ -423,7 +424,7 @@ namespace OpenSim.Grid.UserServer { userProfile.HomeLookAtX = (float)Convert.ToDecimal((string)requestData["home_look_x"]); } - catch (System.InvalidCastException) + catch (InvalidCastException) { m_log.Error("[PROFILE]:Failed to set home lookat x"); } @@ -434,7 +435,7 @@ namespace OpenSim.Grid.UserServer { userProfile.HomeLookAtY = (float)Convert.ToDecimal((string)requestData["home_look_y"]); } - catch (System.InvalidCastException) + catch (InvalidCastException) { m_log.Error("[PROFILE]:Failed to set home lookat y"); } @@ -445,7 +446,7 @@ namespace OpenSim.Grid.UserServer { userProfile.HomeLookAtZ = (float)Convert.ToDecimal((string)requestData["home_look_z"]); } - catch (System.InvalidCastException) + catch (InvalidCastException) { m_log.Error("[PROFILE]:Failed to set home lookat z"); } -- cgit v1.1