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/MySQL/MySQLAssetData.cs | 5 +++--
OpenSim/Data/MySQL/MySQLDataStore.cs | 9 +++++----
OpenSim/Data/MySQL/MySQLGridData.cs | 6 +++---
OpenSim/Data/MySQL/MySQLInventoryData.cs | 7 ++++---
OpenSim/Data/MySQL/MySQLManager.cs | 5 ++---
OpenSim/Data/MySQL/MySQLUserData.cs | 13 +++++++------
6 files changed, 24 insertions(+), 21 deletions(-)
(limited to 'OpenSim/Data/MySQL')
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs
index 50f1cc5..111f7d1 100644
--- a/OpenSim/Data/MySQL/MySQLAssetData.cs
+++ b/OpenSim/Data/MySQL/MySQLAssetData.cs
@@ -28,16 +28,17 @@
using System;
using System.Collections.Generic;
using System.Data;
+using System.Reflection;
using libsecondlife;
+using log4net;
using MySql.Data.MySqlClient;
using OpenSim.Framework;
-using OpenSim.Framework.Console;
namespace OpenSim.Data.MySQL
{
internal class MySQLAssetData : AssetDataBase, IPlugin
{
- 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 MySQLManager _dbConnection;
diff --git a/OpenSim/Data/MySQL/MySQLDataStore.cs b/OpenSim/Data/MySQL/MySQLDataStore.cs
index de15421..08e4456 100644
--- a/OpenSim/Data/MySQL/MySQLDataStore.cs
+++ b/OpenSim/Data/MySQL/MySQLDataStore.cs
@@ -28,12 +28,13 @@
using System;
using System.Collections.Generic;
using System.Data;
-using System.Diagnostics;
using System.IO;
+using System.Reflection;
+using System.Threading;
using libsecondlife;
+using log4net;
using MySql.Data.MySqlClient;
using OpenSim.Framework;
-using OpenSim.Framework.Console;
using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Environment.Scenes;
@@ -41,7 +42,7 @@ namespace OpenSim.Data.MySQL
{
public class MySQLDataStore : IRegionDataStore
{
- 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 const string m_primSelect = "select * from prims";
private const string m_shapeSelect = "select * from primshapes";
@@ -1498,7 +1499,7 @@ namespace OpenSim.Data.MySQL
{
m_log.Error("[MySql]: Error connecting to MySQL server: " + ex.Message);
m_log.Error("[MySql]: Application is terminating!");
- System.Threading.Thread.CurrentThread.Abort();
+ Thread.CurrentThread.Abort();
}
}
diff --git a/OpenSim/Data/MySQL/MySQLGridData.cs b/OpenSim/Data/MySQL/MySQLGridData.cs
index 639f899..b6274d4 100644
--- a/OpenSim/Data/MySQL/MySQLGridData.cs
+++ b/OpenSim/Data/MySQL/MySQLGridData.cs
@@ -28,11 +28,11 @@
using System;
using System.Collections.Generic;
using System.Data;
+using System.Reflection;
using System.Security.Cryptography;
using System.Text;
-using System.Text.RegularExpressions;
using libsecondlife;
-using OpenSim.Framework.Console;
+using log4net;
namespace OpenSim.Data.MySQL
{
@@ -41,7 +41,7 @@ namespace OpenSim.Data.MySQL
///
public class MySQLGridData : GridDataBase
{
- 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);
///
/// MySQL Database Manager
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs
index 82bbf4f..3aed301 100644
--- a/OpenSim/Data/MySQL/MySQLInventoryData.cs
+++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs
@@ -27,10 +27,11 @@
using System;
using System.Collections.Generic;
+using System.Reflection;
using libsecondlife;
+using log4net;
using MySql.Data.MySqlClient;
using OpenSim.Framework;
-using OpenSim.Framework.Console;
namespace OpenSim.Data.MySQL
{
@@ -39,8 +40,8 @@ namespace OpenSim.Data.MySQL
///
public class MySQLInventoryData : 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);
///
/// The database manager
diff --git a/OpenSim/Data/MySQL/MySQLManager.cs b/OpenSim/Data/MySQL/MySQLManager.cs
index a122954..1e7038f 100644
--- a/OpenSim/Data/MySQL/MySQLManager.cs
+++ b/OpenSim/Data/MySQL/MySQLManager.cs
@@ -28,13 +28,12 @@
using System;
using System.Collections.Generic;
using System.Data;
-using System.Data.SqlClient;
using System.IO;
using System.Reflection;
using libsecondlife;
+using log4net;
using MySql.Data.MySqlClient;
using OpenSim.Framework;
-using OpenSim.Framework.Console;
namespace OpenSim.Data.MySQL
{
@@ -43,7 +42,7 @@ namespace OpenSim.Data.MySQL
///
internal class MySQLManager
{
- 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);
///
/// The database connection object
diff --git a/OpenSim/Data/MySQL/MySQLUserData.cs b/OpenSim/Data/MySQL/MySQLUserData.cs
index d04c932..66b65dc 100644
--- a/OpenSim/Data/MySQL/MySQLUserData.cs
+++ b/OpenSim/Data/MySQL/MySQLUserData.cs
@@ -28,10 +28,11 @@
using System;
using System.Collections.Generic;
using System.Data;
+using System.Reflection;
using System.Text.RegularExpressions;
using libsecondlife;
+using log4net;
using OpenSim.Framework;
-using OpenSim.Framework.Console;
namespace OpenSim.Data.MySQL
{
@@ -40,7 +41,7 @@ namespace OpenSim.Data.MySQL
///
internal class MySQLUserData : 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);
///
/// Database manager for MySQL
@@ -348,9 +349,9 @@ namespace OpenSim.Data.MySQL
m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called");
}
- override public List GeneratePickerResults(LLUUID queryID, string query)
+ override public List GeneratePickerResults(LLUUID queryID, string query)
{
- List returnlist = new List();
+ List returnlist = new List();
Regex objAlphaNumericPattern = new Regex("[^a-zA-Z0-9]");
@@ -373,7 +374,7 @@ namespace OpenSim.Data.MySQL
while (reader.Read())
{
- Framework.AvatarPickerAvatar user = new Framework.AvatarPickerAvatar();
+ AvatarPickerAvatar user = new AvatarPickerAvatar();
user.AvatarID = new LLUUID((string) reader["UUID"]);
user.firstName = (string) reader["username"];
user.lastName = (string) reader["lastname"];
@@ -407,7 +408,7 @@ namespace OpenSim.Data.MySQL
while (reader.Read())
{
- Framework.AvatarPickerAvatar user = new Framework.AvatarPickerAvatar();
+ AvatarPickerAvatar user = new AvatarPickerAvatar();
user.AvatarID = new LLUUID((string) reader["UUID"]);
user.firstName = (string) reader["username"];
user.lastName = (string) reader["lastname"];
--
cgit v1.1