* Optimised using statements and namespace references across entire project (this took a while to run).

This commit is contained in:
Adam Frisby
2008-04-21 07:09:17 +00:00
parent 05e24c8f58
commit fef3b36894
306 changed files with 1011 additions and 1306 deletions

View File

@@ -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
/// </summary>
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);

View File

@@ -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);

View File

@@ -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;

View File

@@ -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
/// </summary>
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);

View File

@@ -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();