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/DataSnapshot/DataRequestHandler.cs | 9 +++----- OpenSim/Region/DataSnapshot/DataSnapshotManager.cs | 24 +++++++++++----------- OpenSim/Region/DataSnapshot/EstateSnapshot.cs | 9 +------- .../Interfaces/IDataSnapshotProvider.cs | 4 ---- OpenSim/Region/DataSnapshot/LandSnapshot.cs | 18 +++++++--------- OpenSim/Region/DataSnapshot/ObjectSnapshot.cs | 10 +++------ 6 files changed, 26 insertions(+), 48 deletions(-) (limited to 'OpenSim/Region/DataSnapshot') diff --git a/OpenSim/Region/DataSnapshot/DataRequestHandler.cs b/OpenSim/Region/DataSnapshot/DataRequestHandler.cs index a59d86a..7e096df 100644 --- a/OpenSim/Region/DataSnapshot/DataRequestHandler.cs +++ b/OpenSim/Region/DataSnapshot/DataRequestHandler.cs @@ -26,14 +26,11 @@ * */ -using System; -using System.Collections.Generic; using System.Collections; -using System.Text; +using System.Reflection; using System.Xml; +using log4net; using OpenSim.Region.Environment.Scenes; -using OpenSim.Framework.Servers; -using OpenSim.Framework.Console; namespace OpenSim.Region.DataSnapshot { @@ -41,7 +38,7 @@ namespace OpenSim.Region.DataSnapshot { private Scene m_scene = null; private DataSnapshotManager m_externalData = null; - private log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public DataRequestHandler(Scene scene, DataSnapshotManager externalData) { diff --git a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs index cb9ce44..682763b 100644 --- a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs +++ b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs @@ -28,18 +28,18 @@ using System; using System.Collections.Generic; -using System.Reflection; -using System.Xml; using System.IO; +using System.Net; +using System.Reflection; using System.Text; using System.Timers; -using OpenSim.Framework; +using System.Xml; +using libsecondlife; +using log4net; +using Nini.Config; using OpenSim.Framework.Communications; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; -using Nini.Config; -using libsecondlife; -using libsecondlife.Packets; namespace OpenSim.Region.DataSnapshot { @@ -47,13 +47,13 @@ namespace OpenSim.Region.DataSnapshot { #region Class members private List m_scenes = new List(); - private log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private bool m_enabled = false; private bool m_configLoaded = false; internal object m_syncInit = new object(); private DataRequestHandler m_requests = null; private Dictionary> m_dataproviders = new Dictionary>(); - private Dictionary m_gridinfo = new Dictionary(); + private Dictionary m_gridinfo = new Dictionary(); //private int m_oldestSnapshot = 0; private int m_maxSnapshots = 500; private int m_lastSnapshot = 0; @@ -63,7 +63,7 @@ namespace OpenSim.Region.DataSnapshot private string m_hostname = "127.0.0.1"; private Timer m_periodic = null; private int m_period = 60; // in seconds - private List m_disabledModules = new List(); + private List m_disabledModules = new List(); #endregion #region IRegionModule @@ -72,7 +72,7 @@ namespace OpenSim.Region.DataSnapshot } - public void Initialise(Scene scene, Nini.Config.IConfigSource config) + public void Initialise(Scene scene, IConfigSource config) { if (!m_scenes.Contains(scene)) m_scenes.Add(scene); @@ -495,7 +495,7 @@ namespace OpenSim.Region.DataSnapshot { reply = cli.Request(); } - catch (System.Net.WebException) + catch (WebException) { m_log.Warn("[DATASNAPSHOT] Unable to notify " + url); } @@ -514,7 +514,7 @@ namespace OpenSim.Region.DataSnapshot m_log.Warn("[DATASNAPSHOT] Unable to decode reply from data service. Ignoring. " + e.StackTrace); } // This is not quite working, so... - string responseStr = System.Text.ASCIIEncoding.UTF8.GetString(response); + string responseStr = ASCIIEncoding.UTF8.GetString(response); m_log.Info("[DATASNAPSHOT] data service notified: " + url); } diff --git a/OpenSim/Region/DataSnapshot/EstateSnapshot.cs b/OpenSim/Region/DataSnapshot/EstateSnapshot.cs index b517c16..20ba27c 100644 --- a/OpenSim/Region/DataSnapshot/EstateSnapshot.cs +++ b/OpenSim/Region/DataSnapshot/EstateSnapshot.cs @@ -26,16 +26,9 @@ */ using System; -using System.Collections.Generic; -using System.Text; using System.Xml; -using OpenSim.Region.Environment.Scenes; -using OpenSim.Region.Environment.Modules.LandManagement; -using OpenSim.Framework; -using OpenSim.Framework.Console; -using OpenSim.Framework.Communications; using libsecondlife; -using libsecondlife.Packets; +using OpenSim.Region.Environment.Scenes; namespace OpenSim.Region.DataSnapshot { diff --git a/OpenSim/Region/DataSnapshot/Interfaces/IDataSnapshotProvider.cs b/OpenSim/Region/DataSnapshot/Interfaces/IDataSnapshotProvider.cs index 26124ce..8f580fc 100644 --- a/OpenSim/Region/DataSnapshot/Interfaces/IDataSnapshotProvider.cs +++ b/OpenSim/Region/DataSnapshot/Interfaces/IDataSnapshotProvider.cs @@ -26,12 +26,8 @@ * */ -using System; -using System.Collections.Generic; -using System.Text; using System.Xml; using OpenSim.Region.Environment.Scenes; -using libsecondlife; namespace OpenSim.Region.DataSnapshot { diff --git a/OpenSim/Region/DataSnapshot/LandSnapshot.cs b/OpenSim/Region/DataSnapshot/LandSnapshot.cs index a82f4be..4c17513 100644 --- a/OpenSim/Region/DataSnapshot/LandSnapshot.cs +++ b/OpenSim/Region/DataSnapshot/LandSnapshot.cs @@ -28,18 +28,14 @@ using System; using System.Collections.Generic; -using System.Text; -using System.Xml; using System.Reflection; - -using OpenSim.Region.Environment.Scenes; -using OpenSim.Region.Environment.Modules.LandManagement; -using OpenSim.Region.Environment.Interfaces; -using OpenSim.Framework; -using OpenSim.Framework.Console; -using OpenSim.Framework.Communications; +using System.Xml; using libsecondlife; -using libsecondlife.Packets; +using log4net; +using OpenSim.Framework; +using OpenSim.Region.Environment.Interfaces; +using OpenSim.Region.Environment.Modules.LandManagement; +using OpenSim.Region.Environment.Scenes; namespace OpenSim.Region.DataSnapshot { @@ -48,7 +44,7 @@ namespace OpenSim.Region.DataSnapshot private Scene m_scene = null; private DataSnapshotManager m_parent = null; //private Dictionary m_landIndexed = new Dictionary(); - private log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); #region Dead code diff --git a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs b/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs index 353a02b..d48ecfd 100644 --- a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs +++ b/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs @@ -25,14 +25,10 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; -using System.Collections.Generic; -using System.Text; -using System.Xml; using System.Reflection; +using System.Xml; +using log4net; using OpenSim.Region.Environment.Scenes; -using OpenSim.Framework; -using libsecondlife; namespace OpenSim.Region.DataSnapshot { @@ -40,7 +36,7 @@ namespace OpenSim.Region.DataSnapshot { private Scene m_scene = null; private DataSnapshotManager m_parent = null; - private log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public void Initialize(Scene scene, DataSnapshotManager parent) { -- cgit v1.1