From 9b6b6d05d45cf0f754a0b26bf6240ef50be66563 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Tue, 3 Jul 2007 14:37:29 +0000 Subject: * Optimized usings (the 'LL ate my scripts' commit) * added some licensing info --- OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs | 22 ++++++++++++---------- OpenSim/Framework/Data.MSSQL/MSSQLManager.cs | 7 ++----- .../Data.MSSQL/Properties/AssemblyInfo.cs | 2 -- 3 files changed, 14 insertions(+), 17 deletions(-) (limited to 'OpenSim/Framework/Data.MSSQL') diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs index 5bdceaf..ca9196a5 100644 --- a/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs +++ b/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs @@ -27,8 +27,10 @@ */ using System; using System.Collections.Generic; +using System.Data; +using System.Security.Cryptography; using System.Text; -using OpenSim.Framework.Data; +using libsecondlife; namespace OpenSim.Framework.Data.MSSQL { @@ -99,8 +101,8 @@ namespace OpenSim.Framework.Data.MSSQL Dictionary param = new Dictionary(); param["handle"] = handle.ToString(); - System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE handle = @handle", param); - System.Data.IDataReader reader = result.ExecuteReader(); + IDbCommand result = database.Query("SELECT * FROM regions WHERE handle = @handle", param); + IDataReader reader = result.ExecuteReader(); SimProfileData row = database.getRow(reader); reader.Close(); @@ -114,13 +116,13 @@ namespace OpenSim.Framework.Data.MSSQL /// /// The region UUID /// The sim profile - public SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID uuid) + public SimProfileData GetProfileByLLUUID(LLUUID uuid) { Dictionary param = new Dictionary(); param["uuid"] = uuid.ToStringHyphenated(); - System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param); - System.Data.IDataReader reader = result.ExecuteReader(); + IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param); + IDataReader reader = result.ExecuteReader(); SimProfileData row = database.getRow(reader); reader.Close(); @@ -153,7 +155,7 @@ namespace OpenSim.Framework.Data.MSSQL /// The attempted regionHandle of the challenger /// The secret /// Whether the secret and regionhandle match the database entry for UUID - public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authkey) + public bool AuthenticateSim(LLUUID uuid, ulong handle, string authkey) { bool throwHissyFit = false; // Should be true by 1.0 @@ -174,10 +176,10 @@ namespace OpenSim.Framework.Data.MSSQL /// /// /// - public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authhash, string challenge) + public bool AuthenticateSim(LLUUID uuid, ulong handle, string authhash, string challenge) { - System.Security.Cryptography.SHA512Managed HashProvider = new System.Security.Cryptography.SHA512Managed(); - System.Text.ASCIIEncoding TextProvider = new ASCIIEncoding(); + SHA512Managed HashProvider = new SHA512Managed(); + ASCIIEncoding TextProvider = new ASCIIEncoding(); byte[] stream = TextProvider.GetBytes(uuid.ToStringHyphenated() + ":" + handle.ToString() + ":" + challenge); byte[] hash = HashProvider.ComputeHash(stream); diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs b/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs index 3c83c1f..49bf31c 100644 --- a/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs +++ b/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs @@ -27,12 +27,9 @@ */ using System; using System.Collections.Generic; -using System.Text; using System.Data; - using System.Data.SqlClient; - -using OpenSim.Framework.Data; +using libsecondlife; namespace OpenSim.Framework.Data.MSSQL { @@ -110,7 +107,7 @@ namespace OpenSim.Framework.Data.MSSQL // Region Main regionprofile.regionHandle = (ulong)reader["regionHandle"]; regionprofile.regionName = (string)reader["regionName"]; - regionprofile.UUID = new libsecondlife.LLUUID((string)reader["uuid"]); + regionprofile.UUID = new LLUUID((string)reader["uuid"]); // Secrets regionprofile.regionRecvKey = (string)reader["regionRecvKey"]; diff --git a/OpenSim/Framework/Data.MSSQL/Properties/AssemblyInfo.cs b/OpenSim/Framework/Data.MSSQL/Properties/AssemblyInfo.cs index af310e8..066c739 100644 --- a/OpenSim/Framework/Data.MSSQL/Properties/AssemblyInfo.cs +++ b/OpenSim/Framework/Data.MSSQL/Properties/AssemblyInfo.cs @@ -1,7 +1,5 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -- cgit v1.1