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). --- .../Communications/Local/LocalBackEndServices.cs | 10 ++++++---- .../Communications/Local/LocalInventoryService.cs | 6 ++++-- .../Region/Communications/Local/LocalLoginService.cs | 11 ++++------- .../Region/Communications/Local/LocalUserServices.cs | 1 - 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 ++++--- 8 files changed, 36 insertions(+), 29 deletions(-) (limited to 'OpenSim/Region/Communications') diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs index f5a5e83..2960a62 100644 --- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs +++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs @@ -25,18 +25,20 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; using System.Collections; using System.Collections.Generic; +using System.Reflection; using libsecondlife; +using log4net; using OpenSim.Framework; using OpenSim.Framework.Communications; -using OpenSim.Framework.Console; namespace OpenSim.Region.Communications.Local { public class LocalBackEndServices : 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); protected Dictionary m_regions = new Dictionary(); @@ -47,7 +49,7 @@ namespace OpenSim.Region.Communications.Local private Dictionary m_queuedGridSettings = new Dictionary(); - public string _gdebugRegionName = System.String.Empty; + public string _gdebugRegionName = String.Empty; bool m_bAvailable=true; @@ -67,7 +69,7 @@ namespace OpenSim.Region.Communications.Local set { _gdebugRegionName = value; } } - public string _rdebugRegionName = System.String.Empty; + public string _rdebugRegionName = String.Empty; public string rdebugRegionName { diff --git a/OpenSim/Region/Communications/Local/LocalInventoryService.cs b/OpenSim/Region/Communications/Local/LocalInventoryService.cs index dafd637..a567eeb 100644 --- a/OpenSim/Region/Communications/Local/LocalInventoryService.cs +++ b/OpenSim/Region/Communications/Local/LocalInventoryService.cs @@ -26,7 +26,9 @@ */ using System.Collections.Generic; +using System.Reflection; using libsecondlife; +using log4net; using OpenSim.Framework; using OpenSim.Framework.Communications; using OpenSim.Framework.Communications.Cache; @@ -39,8 +41,8 @@ namespace OpenSim.Region.Communications.Local /// public class LocalInventoryService : 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/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index 79bf9e5..c4823f4 100644 --- a/OpenSim/Region/Communications/Local/LocalLoginService.cs +++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs @@ -28,14 +28,11 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Reflection; using libsecondlife; - +using log4net; using OpenSim.Framework; -using OpenSim.Framework.Communications.Cache; -using OpenSim.Framework.Console; -using OpenSim.Framework.Statistics; using OpenSim.Framework.UserManagement; -using InventoryFolder=OpenSim.Framework.InventoryFolder; namespace OpenSim.Region.Communications.Local { @@ -43,8 +40,8 @@ namespace OpenSim.Region.Communications.Local public class LocalLoginService : 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); private CommunicationsLocal m_Parent; diff --git a/OpenSim/Region/Communications/Local/LocalUserServices.cs b/OpenSim/Region/Communications/Local/LocalUserServices.cs index c543762..29de8fd 100644 --- a/OpenSim/Region/Communications/Local/LocalUserServices.cs +++ b/OpenSim/Region/Communications/Local/LocalUserServices.cs @@ -29,7 +29,6 @@ using System; using libsecondlife; using OpenSim.Framework; using OpenSim.Framework.Communications; -using OpenSim.Framework.Statistics; using OpenSim.Framework.UserManagement; namespace OpenSim.Region.Communications.Local 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