diff options
author | Adam Frisby | 2008-04-21 07:09:17 +0000 |
---|---|---|
committer | Adam Frisby | 2008-04-21 07:09:17 +0000 |
commit | fef3b3689492dea63693c964bcdbec9f5137eb5e (patch) | |
tree | 7791eef001d85d3e1de863a68f26ff9434d062ca /OpenSim/Data/MySQL | |
parent | * Terrain Module code has been reformatted to comply with guidelines. (diff) | |
download | opensim-SC_OLD-fef3b3689492dea63693c964bcdbec9f5137eb5e.zip opensim-SC_OLD-fef3b3689492dea63693c964bcdbec9f5137eb5e.tar.gz opensim-SC_OLD-fef3b3689492dea63693c964bcdbec9f5137eb5e.tar.bz2 opensim-SC_OLD-fef3b3689492dea63693c964bcdbec9f5137eb5e.tar.xz |
* Optimised using statements and namespace references across entire project (this took a while to run).
Diffstat (limited to 'OpenSim/Data/MySQL')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLAssetData.cs | 5 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLDataStore.cs | 9 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLGridData.cs | 6 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLInventoryData.cs | 7 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLManager.cs | 5 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLUserData.cs | 13 |
6 files changed, 24 insertions, 21 deletions
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 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Data; | 30 | using System.Data; |
31 | using System.Reflection; | ||
31 | using libsecondlife; | 32 | using libsecondlife; |
33 | using log4net; | ||
32 | using MySql.Data.MySqlClient; | 34 | using MySql.Data.MySqlClient; |
33 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
34 | using OpenSim.Framework.Console; | ||
35 | 36 | ||
36 | namespace OpenSim.Data.MySQL | 37 | namespace OpenSim.Data.MySQL |
37 | { | 38 | { |
38 | internal class MySQLAssetData : AssetDataBase, IPlugin | 39 | internal class MySQLAssetData : AssetDataBase, IPlugin |
39 | { | 40 | { |
40 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 41 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
41 | 42 | ||
42 | private MySQLManager _dbConnection; | 43 | private MySQLManager _dbConnection; |
43 | 44 | ||
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 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Data; | 30 | using System.Data; |
31 | using System.Diagnostics; | ||
32 | using System.IO; | 31 | using System.IO; |
32 | using System.Reflection; | ||
33 | using System.Threading; | ||
33 | using libsecondlife; | 34 | using libsecondlife; |
35 | using log4net; | ||
34 | using MySql.Data.MySqlClient; | 36 | using MySql.Data.MySqlClient; |
35 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
36 | using OpenSim.Framework.Console; | ||
37 | using OpenSim.Region.Environment.Interfaces; | 38 | using OpenSim.Region.Environment.Interfaces; |
38 | using OpenSim.Region.Environment.Scenes; | 39 | using OpenSim.Region.Environment.Scenes; |
39 | 40 | ||
@@ -41,7 +42,7 @@ namespace OpenSim.Data.MySQL | |||
41 | { | 42 | { |
42 | public class MySQLDataStore : IRegionDataStore | 43 | public class MySQLDataStore : IRegionDataStore |
43 | { | 44 | { |
44 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | 46 | ||
46 | private const string m_primSelect = "select * from prims"; | 47 | private const string m_primSelect = "select * from prims"; |
47 | private const string m_shapeSelect = "select * from primshapes"; | 48 | private const string m_shapeSelect = "select * from primshapes"; |
@@ -1498,7 +1499,7 @@ namespace OpenSim.Data.MySQL | |||
1498 | { | 1499 | { |
1499 | m_log.Error("[MySql]: Error connecting to MySQL server: " + ex.Message); | 1500 | m_log.Error("[MySql]: Error connecting to MySQL server: " + ex.Message); |
1500 | m_log.Error("[MySql]: Application is terminating!"); | 1501 | m_log.Error("[MySql]: Application is terminating!"); |
1501 | System.Threading.Thread.CurrentThread.Abort(); | 1502 | Thread.CurrentThread.Abort(); |
1502 | } | 1503 | } |
1503 | } | 1504 | } |
1504 | 1505 | ||
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 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Data; | 30 | using System.Data; |
31 | using System.Reflection; | ||
31 | using System.Security.Cryptography; | 32 | using System.Security.Cryptography; |
32 | using System.Text; | 33 | using System.Text; |
33 | using System.Text.RegularExpressions; | ||
34 | using libsecondlife; | 34 | using libsecondlife; |
35 | using OpenSim.Framework.Console; | 35 | using log4net; |
36 | 36 | ||
37 | namespace OpenSim.Data.MySQL | 37 | namespace OpenSim.Data.MySQL |
38 | { | 38 | { |
@@ -41,7 +41,7 @@ namespace OpenSim.Data.MySQL | |||
41 | /// </summary> | 41 | /// </summary> |
42 | public class MySQLGridData : GridDataBase | 42 | public class MySQLGridData : GridDataBase |
43 | { | 43 | { |
44 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 44 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | 45 | ||
46 | /// <summary> | 46 | /// <summary> |
47 | /// MySQL Database Manager | 47 | /// 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 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Reflection; | ||
30 | using libsecondlife; | 31 | using libsecondlife; |
32 | using log4net; | ||
31 | using MySql.Data.MySqlClient; | 33 | using MySql.Data.MySqlClient; |
32 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
33 | using OpenSim.Framework.Console; | ||
34 | 35 | ||
35 | namespace OpenSim.Data.MySQL | 36 | namespace OpenSim.Data.MySQL |
36 | { | 37 | { |
@@ -39,8 +40,8 @@ namespace OpenSim.Data.MySQL | |||
39 | /// </summary> | 40 | /// </summary> |
40 | public class MySQLInventoryData : IInventoryData | 41 | public class MySQLInventoryData : IInventoryData |
41 | { | 42 | { |
42 | private static readonly log4net.ILog m_log | 43 | private static readonly ILog m_log |
43 | = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 44 | = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
44 | 45 | ||
45 | /// <summary> | 46 | /// <summary> |
46 | /// The database manager | 47 | /// 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 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Data; | 30 | using System.Data; |
31 | using System.Data.SqlClient; | ||
32 | using System.IO; | 31 | using System.IO; |
33 | using System.Reflection; | 32 | using System.Reflection; |
34 | using libsecondlife; | 33 | using libsecondlife; |
34 | using log4net; | ||
35 | using MySql.Data.MySqlClient; | 35 | using MySql.Data.MySqlClient; |
36 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
37 | using OpenSim.Framework.Console; | ||
38 | 37 | ||
39 | namespace OpenSim.Data.MySQL | 38 | namespace OpenSim.Data.MySQL |
40 | { | 39 | { |
@@ -43,7 +42,7 @@ namespace OpenSim.Data.MySQL | |||
43 | /// </summary> | 42 | /// </summary> |
44 | internal class MySQLManager | 43 | internal class MySQLManager |
45 | { | 44 | { |
46 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
47 | 46 | ||
48 | /// <summary> | 47 | /// <summary> |
49 | /// The database connection object | 48 | /// 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 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Data; | 30 | using System.Data; |
31 | using System.Reflection; | ||
31 | using System.Text.RegularExpressions; | 32 | using System.Text.RegularExpressions; |
32 | using libsecondlife; | 33 | using libsecondlife; |
34 | using log4net; | ||
33 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
34 | using OpenSim.Framework.Console; | ||
35 | 36 | ||
36 | namespace OpenSim.Data.MySQL | 37 | namespace OpenSim.Data.MySQL |
37 | { | 38 | { |
@@ -40,7 +41,7 @@ namespace OpenSim.Data.MySQL | |||
40 | /// </summary> | 41 | /// </summary> |
41 | internal class MySQLUserData : UserDataBase | 42 | internal class MySQLUserData : UserDataBase |
42 | { | 43 | { |
43 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 44 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
44 | 45 | ||
45 | /// <summary> | 46 | /// <summary> |
46 | /// Database manager for MySQL | 47 | /// Database manager for MySQL |
@@ -348,9 +349,9 @@ namespace OpenSim.Data.MySQL | |||
348 | m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called"); | 349 | m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called"); |
349 | } | 350 | } |
350 | 351 | ||
351 | override public List<Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) | 352 | override public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) |
352 | { | 353 | { |
353 | List<Framework.AvatarPickerAvatar> returnlist = new List<Framework.AvatarPickerAvatar>(); | 354 | List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>(); |
354 | 355 | ||
355 | Regex objAlphaNumericPattern = new Regex("[^a-zA-Z0-9]"); | 356 | Regex objAlphaNumericPattern = new Regex("[^a-zA-Z0-9]"); |
356 | 357 | ||
@@ -373,7 +374,7 @@ namespace OpenSim.Data.MySQL | |||
373 | 374 | ||
374 | while (reader.Read()) | 375 | while (reader.Read()) |
375 | { | 376 | { |
376 | Framework.AvatarPickerAvatar user = new Framework.AvatarPickerAvatar(); | 377 | AvatarPickerAvatar user = new AvatarPickerAvatar(); |
377 | user.AvatarID = new LLUUID((string) reader["UUID"]); | 378 | user.AvatarID = new LLUUID((string) reader["UUID"]); |
378 | user.firstName = (string) reader["username"]; | 379 | user.firstName = (string) reader["username"]; |
379 | user.lastName = (string) reader["lastname"]; | 380 | user.lastName = (string) reader["lastname"]; |
@@ -407,7 +408,7 @@ namespace OpenSim.Data.MySQL | |||
407 | 408 | ||
408 | while (reader.Read()) | 409 | while (reader.Read()) |
409 | { | 410 | { |
410 | Framework.AvatarPickerAvatar user = new Framework.AvatarPickerAvatar(); | 411 | AvatarPickerAvatar user = new AvatarPickerAvatar(); |
411 | user.AvatarID = new LLUUID((string) reader["UUID"]); | 412 | user.AvatarID = new LLUUID((string) reader["UUID"]); |
412 | user.firstName = (string) reader["username"]; | 413 | user.firstName = (string) reader["username"]; |
413 | user.lastName = (string) reader["lastname"]; | 414 | user.lastName = (string) reader["lastname"]; |