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/Region/Communications/OGS1/OGS1GridServices.cs | 8 +++++--- .../Region/Communications/OGS1/OGS1InterSimComms.cs | 4 +++- .../Region/Communications/OGS1/OGS1InventoryService.cs | 18 ++++++++++-------- OpenSim/Region/Communications/OGS1/OGS1UserServices.cs | 7 ++++--- 4 files changed, 22 insertions(+), 15 deletions(-) (limited to 'OpenSim/Region/Communications/OGS1') diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index 1135ddd..eada868 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs @@ -30,15 +30,17 @@ using System.Collections; using System.Collections.Generic; using System.Net; using System.Net.Sockets; +using System.Reflection; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Tcp; using System.Security.Authentication; +using System.Threading; using libsecondlife; +using log4net; using Nwc.XmlRpc; using OpenSim.Framework; using OpenSim.Framework.Communications; -using OpenSim.Framework.Console; using OpenSim.Framework.Servers; using OpenSim.Region.Communications.Local; @@ -46,7 +48,7 @@ namespace OpenSim.Region.Communications.OGS1 { public class OGS1GridServices : IGridServices, IInterRegionCommunications { - 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 LocalBackEndServices m_localBackend = new LocalBackEndServices(); private Dictionary m_remoteRegionInfoCache = new Dictionary(); @@ -1461,7 +1463,7 @@ namespace OpenSim.Region.Communications.OGS1 Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); IAsyncResult ar = socket.BeginConnect(m_EndPoint, ConnectedMethodCallback, socket); ar.AsyncWaitHandle.WaitOne(timeOut*1000, false); - System.Threading.Thread.Sleep(500); + Thread.Sleep(500); } public bool Available diff --git a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs index 2e106d7..8285fb1 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs @@ -26,8 +26,10 @@ */ using System; +using System.Reflection; using System.Runtime.Remoting; using libsecondlife; +using log4net; using OpenSim.Framework; namespace OpenSim.Region.Communications.OGS1 @@ -153,7 +155,7 @@ namespace OpenSim.Region.Communications.OGS1 public class OGS1InterRegionRemoting : MarshalByRefObject { - 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 OGS1InterRegionRemoting() { diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs index fbe905c..e0167a7 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs @@ -27,19 +27,21 @@ using System; using System.Collections.Generic; +using System.Net; +using System.Reflection; using libsecondlife; +using log4net; using OpenSim.Framework; using OpenSim.Framework.Communications; using OpenSim.Framework.Communications.Cache; -using OpenSim.Framework.Console; using OpenSim.Framework.Servers; namespace OpenSim.Region.Communications.OGS1 { public class OGS1InventoryService : IInventoryServices { - 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 string _inventoryServerUrl; private Dictionary m_RequestingInventory = new Dictionary(); @@ -71,7 +73,7 @@ namespace OpenSim.Region.Communications.OGS1 requester.BeginPostObject(_inventoryServerUrl + "/GetInventory/", userID.UUID); } - catch (System.Net.WebException e) + catch (WebException e) { m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Request inventory operation failed, {0} {1}", e.Source, e.Message); @@ -153,7 +155,7 @@ namespace OpenSim.Region.Communications.OGS1 SynchronousRestObjectPoster.BeginPostObject( "POST", _inventoryServerUrl + "/NewFolder/", folder); } - catch (System.Net.WebException e) + catch (WebException e) { m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Add new inventory folder operation failed, {0} {1}", e.Source, e.Message); @@ -167,7 +169,7 @@ namespace OpenSim.Region.Communications.OGS1 SynchronousRestObjectPoster.BeginPostObject( "POST", _inventoryServerUrl + "/MoveFolder/", folder); } - catch (System.Net.WebException e) + catch (WebException e) { m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Move inventory folder operation failed, {0} {1}", e.Source, e.Message); @@ -181,7 +183,7 @@ namespace OpenSim.Region.Communications.OGS1 SynchronousRestObjectPoster.BeginPostObject( "POST", _inventoryServerUrl + "/NewItem/", item); } - catch (System.Net.WebException e) + catch (WebException e) { m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Add new inventory item operation failed, {0} {1}", e.Source, e.Message); @@ -195,7 +197,7 @@ namespace OpenSim.Region.Communications.OGS1 SynchronousRestObjectPoster.BeginPostObject( "POST", _inventoryServerUrl + "/DeleteItem/", item); } - catch (System.Net.WebException e) + catch (WebException e) { m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Delete inventory item operation failed, {0} {1}", e.Source, e.Message); diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs index c140213..56b0e8c 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs @@ -29,17 +29,18 @@ using System; using System.Collections; using System.Collections.Generic; using System.Net; +using System.Reflection; using System.Text.RegularExpressions; using libsecondlife; +using log4net; using Nwc.XmlRpc; using OpenSim.Framework; -using OpenSim.Framework.Console; namespace OpenSim.Region.Communications.OGS1 { public class OGS1UserServices : IUserService { - 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 CommunicationsOGS1 m_parent; @@ -158,7 +159,7 @@ namespace OpenSim.Region.Communications.OGS1 { XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 3000); } - catch (System.Net.WebException) + catch (WebException) { m_log.Warn("[LOGOFF]: Unable to notify grid server of user logoff"); } -- cgit v1.1