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/Data/NHibernate/NHibernateAssetData.cs | 14 ++++++-------- OpenSim/Data/NHibernate/NHibernateInventoryData.cs | 18 ++++++++---------- OpenSim/Data/NHibernate/NHibernateManager.cs | 9 +++------ OpenSim/Data/NHibernate/NHibernateUserData.cs | 16 ++++++---------- OpenSim/Data/NHibernate/Types/LLUUIDUserType.cs | 6 +++--- 5 files changed, 26 insertions(+), 37 deletions(-) (limited to 'OpenSim/Data/NHibernate') diff --git a/OpenSim/Data/NHibernate/NHibernateAssetData.cs b/OpenSim/Data/NHibernate/NHibernateAssetData.cs index cc018dd..db90d09 100644 --- a/OpenSim/Data/NHibernate/NHibernateAssetData.cs +++ b/OpenSim/Data/NHibernate/NHibernateAssetData.cs @@ -26,17 +26,15 @@ */ using System; -using System.Data; +using System.IO; using System.Reflection; using libsecondlife; +using log4net; using NHibernate; using NHibernate.Cfg; -using NHibernate.Tool.hbm2ddl; using NHibernate.Mapping.Attributes; -using OpenSim.Data; using OpenSim.Framework; -using OpenSim.Framework.Console; -using Environment = NHibernate.Cfg.Environment; +using Environment=NHibernate.Cfg.Environment; namespace OpenSim.Data.NHibernate { @@ -45,7 +43,7 @@ namespace OpenSim.Data.NHibernate /// public class NHibernateAssetData : AssetDataBase, IDisposable { - 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 Configuration cfg; private ISessionFactory factory; @@ -67,8 +65,8 @@ namespace OpenSim.Data.NHibernate cfg.AddAssembly("OpenSim.Data.NHibernate"); HbmSerializer.Default.Validate = true; - using ( System.IO.MemoryStream stream = - HbmSerializer.Default.Serialize(System.Reflection.Assembly.GetExecutingAssembly())) + using ( MemoryStream stream = + HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly())) cfg.AddInputStream(stream); // new SchemaExport(cfg).Create(true, true); diff --git a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs index a004e29..1ac0f0c 100644 --- a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs +++ b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs @@ -26,25 +26,23 @@ */ using System; -using System.Data; -using System.Reflection; using System.Collections.Generic; +using System.IO; +using System.Reflection; using libsecondlife; +using log4net; using NHibernate; -using NHibernate.Expression; using NHibernate.Cfg; -using NHibernate.Tool.hbm2ddl; +using NHibernate.Expression; using NHibernate.Mapping.Attributes; -using OpenSim.Data; using OpenSim.Framework; -using OpenSim.Framework.Console; -using Environment = NHibernate.Cfg.Environment; +using Environment=NHibernate.Cfg.Environment; namespace OpenSim.Data.NHibernate { public class NHibernateInventoryData: IInventoryData { - 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 Configuration cfg; private ISessionFactory factory; @@ -74,8 +72,8 @@ namespace OpenSim.Data.NHibernate cfg.AddAssembly("OpenSim.Data.NHibernate"); HbmSerializer.Default.Validate = true; - using ( System.IO.MemoryStream stream = - HbmSerializer.Default.Serialize(System.Reflection.Assembly.GetExecutingAssembly())) + using ( MemoryStream stream = + HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly())) cfg.AddInputStream(stream); // new SchemaExport(cfg).Create(true, true); diff --git a/OpenSim/Data/NHibernate/NHibernateManager.cs b/OpenSim/Data/NHibernate/NHibernateManager.cs index edef8ad..6f13294 100644 --- a/OpenSim/Data/NHibernate/NHibernateManager.cs +++ b/OpenSim/Data/NHibernate/NHibernateManager.cs @@ -25,18 +25,15 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; -using System.Collections.Generic; -using System.Data; -using libsecondlife; +using System.Reflection; +using log4net; using NHibernate; -using NHibernate.Cfg; namespace OpenSim.Data.NHibernate { internal class NHibernateManager { - 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 ISessionFactory factory; private ISession session; diff --git a/OpenSim/Data/NHibernate/NHibernateUserData.cs b/OpenSim/Data/NHibernate/NHibernateUserData.cs index 0bbebaa..c0fe26c 100644 --- a/OpenSim/Data/NHibernate/NHibernateUserData.cs +++ b/OpenSim/Data/NHibernate/NHibernateUserData.cs @@ -25,20 +25,16 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; -using System.Data; -using System.Reflection; using System.Collections.Generic; +using System.IO; +using System.Reflection; using libsecondlife; +using log4net; using NHibernate; using NHibernate.Cfg; using NHibernate.Expression; -using NHibernate.Tool.hbm2ddl; using NHibernate.Mapping.Attributes; -using OpenSim.Data; using OpenSim.Framework; -using OpenSim.Framework.Console; -using Environment = NHibernate.Cfg.Environment; namespace OpenSim.Data.NHibernate { @@ -47,7 +43,7 @@ namespace OpenSim.Data.NHibernate /// public class NHibernateUserData : UserDataBase { - 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 Configuration cfg; private ISessionFactory factory; @@ -69,8 +65,8 @@ namespace OpenSim.Data.NHibernate cfg.AddAssembly("OpenSim.Data.NHibernate"); HbmSerializer.Default.Validate = true; - using ( System.IO.MemoryStream stream = - HbmSerializer.Default.Serialize(System.Reflection.Assembly.GetExecutingAssembly())) + using ( MemoryStream stream = + HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly())) cfg.AddInputStream(stream); // new SchemaExport(cfg).Create(true, true); diff --git a/OpenSim/Data/NHibernate/Types/LLUUIDUserType.cs b/OpenSim/Data/NHibernate/Types/LLUUIDUserType.cs index 2c1f7dd..e4f1dc2 100644 --- a/OpenSim/Data/NHibernate/Types/LLUUIDUserType.cs +++ b/OpenSim/Data/NHibernate/Types/LLUUIDUserType.cs @@ -27,10 +27,10 @@ using System; using System.Data; +using libsecondlife; using NHibernate; using NHibernate.SqlTypes; using NHibernate.UserTypes; -using libsecondlife; namespace OpenSim.Data.NHibernate { @@ -67,7 +67,7 @@ namespace OpenSim.Data.NHibernate get { return false; } } - public object NullSafeGet(System.Data.IDataReader rs, string[] names, object owner) + public object NullSafeGet(IDataReader rs, string[] names, object owner) { object uuid = null; @@ -81,7 +81,7 @@ namespace OpenSim.Data.NHibernate return uuid; } - public void NullSafeSet(System.Data.IDbCommand cmd, object obj, int index) + public void NullSafeSet(IDbCommand cmd, object obj, int index) { LLUUID uuid = (LLUUID)obj; ((IDataParameter)cmd.Parameters[index]).Value = uuid.ToString(); -- cgit v1.1