Formatting cleanup. Add copyright notices.

This commit is contained in:
Jeff Ames
2010-03-10 13:15:36 +09:00
parent c5bb51b443
commit f58a0394ed
40 changed files with 349 additions and 79 deletions

View File

@@ -44,7 +44,7 @@ namespace OpenSim.Data
/// </summary>
public interface IGridUserData
{
GridUserData GetGridUserData(string userID);
GridUserData GetGridUserData(string userID);
bool StoreGridUserData(GridUserData data);
}
}

View File

@@ -47,7 +47,7 @@ namespace OpenSim.Data.MSSQL
public MSSQLAvatarData(string connectionString, string realm) :
base(connectionString, realm, "Avatar")
{
{
}
public bool Delete(UUID principalID, string name)

View File

@@ -110,7 +110,7 @@ namespace OpenSim.Data.MSSQL
{
List<string> constraints = new List<string>();
string query = string.Format(@"SELECT
COL_NAME(ic.object_id,ic.column_id) AS column_name
COL_NAME(ic.object_id,ic.column_id) AS column_name
FROM sys.indexes AS i
INNER JOIN sys.index_columns AS ic
ON i.object_id = ic.object_id AND i.index_id = ic.index_id
@@ -157,7 +157,7 @@ namespace OpenSim.Data.MSSQL
string where = String.Join(" AND ", terms.ToArray());
string query = String.Format("SELECT * FROM {0} WHERE {1}",
m_Realm, where);
m_Realm, where);
cmd.Connection = conn;
cmd.CommandText = query;
@@ -296,7 +296,7 @@ namespace OpenSim.Data.MSSQL
query.AppendFormat("[{0}] = {1} ", names[i], values[i]);
if (constraints.Count > 0)
{
List<string> terms = new List<string>();
List<string> terms = new List<string>();
for (int j = 0; j < constraints.Count; j++)
{
terms.Add(" [" + constraints[j].Key + "] = @" + constraints[j].Key);

View File

@@ -47,7 +47,7 @@ namespace OpenSim.Data.MSSQL
public MSSQLGridUserData(string connectionString, string realm) :
base(connectionString, realm, "UserGrid")
{
{
}
public GridUserData GetGridUserData(string userID)
@@ -58,7 +58,7 @@ namespace OpenSim.Data.MSSQL
return null;
return ret[0];
}
}
public bool StoreGridUserData(GridUserData data)
{

View File

@@ -46,7 +46,7 @@ namespace OpenSim.Data.MSSQL
/// <summary>
/// Connection string for ADO.net
/// </summary>
private readonly string connectionString;
private readonly string connectionString;
/// <summary>
/// Initialize the manager and set the connectionstring
@@ -196,7 +196,7 @@ namespace OpenSim.Data.MSSQL
migration.Update();
}
}
}
/// <summary>
/// Returns the version of this DB provider

View File

@@ -43,7 +43,7 @@ namespace OpenSim.Data.MSSQL
{
}
//private string m_Realm;
//private List<string> m_ColumnNames = null;
//private List<string> m_ColumnNames = null;
//private MSSQLManager m_database;
//public MSSQLUserAccountData(string connectionString, string realm)

View File

@@ -197,7 +197,7 @@ namespace OpenSim.Data.MySQL
public virtual T[] Get(string where)
{
using (MySqlCommand cmd = new MySqlCommand())
{
{
string query = String.Format("select * from {0} where {1}",
m_Realm, where);

View File

@@ -54,7 +54,7 @@ namespace OpenSim.Data.MySQL
return null;
return ret[0];
}
}
public bool StoreGridUserData(GridUserData data)
{

View File

@@ -134,7 +134,7 @@ namespace OpenSim.Data.MySQL
List<UUID> deleteSessions = new List<UUID>();
int online = 0;
while(reader.Read())
while (reader.Read())
{
if (bool.Parse(reader["Online"].ToString()))
online++;

View File

@@ -55,7 +55,7 @@ namespace OpenSim.Data.Null
}
public bool Store(PresenceData data)
{
{
if (Instance != this)
return Instance.Store(data);
@@ -113,7 +113,7 @@ namespace OpenSim.Data.Null
}
public bool SetHomeLocation(string userID, UUID regionID, Vector3 position, Vector3 lookAt)
{
{
if (Instance != this)
return Instance.SetHomeLocation(userID, regionID, position, lookAt);
@@ -130,28 +130,28 @@ namespace OpenSim.Data.Null
p.Data["HomePosition"] = position.ToString();
p.Data["HomeLookAt"] = lookAt.ToString();
foundone = true;
}
}
}
return foundone;
}
public PresenceData[] Get(string field, string data)
{
{
if (Instance != this)
return Instance.Get(field, data);
// m_log.DebugFormat(
// "[NULL PRESENCE DATA]: Getting presence data for field {0} with parameter {1}", field, data);
// "[NULL PRESENCE DATA]: Getting presence data for field {0} with parameter {1}", field, data);
List<PresenceData> presences = new List<PresenceData>();
if (field == "UserID")
{
foreach (PresenceData p in m_presenceData.Values)
{
if (p.UserID == data)
if (p.UserID == data)
{
presences.Add(p);
presences.Add(p);
// Console.WriteLine("HOME for " + p.UserID + " is " + (p.Data.ContainsKey("HomeRegionID") ? p.Data["HomeRegionID"] : "Not found"));
}
}
@@ -194,7 +194,7 @@ namespace OpenSim.Data.Null
}
public void Prune(string userID)
{
{
if (Instance != this)
{
Instance.Prune(userID);

View File

@@ -120,7 +120,7 @@ namespace OpenSim.Data.SQLite
}
public bool Store(AuthenticationData data)
{
{
if (data.Data.ContainsKey("UUID"))
data.Data.Remove("UUID");