From c995d60d37032db3198b8496e186aa7a892dc7a8 Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Wed, 14 May 2008 05:11:23 +0000
Subject: Formatting cleanup.
---
OpenSim/Data/Base/BaseDataReader.cs | 6 +--
OpenSim/Data/Base/BaseTableMapper.cs | 10 ++---
OpenSim/Data/MSSQLMapper/MSSQLDatabaseMapper.cs | 2 +-
OpenSim/Data/MySQL/MySQLManager.cs | 2 +-
OpenSim/Data/MySQL/MySQLUserData.cs | 2 +-
OpenSim/Data/MySQLMapper/MySQLDatabaseMapper.cs | 2 +-
OpenSim/Data/NHibernate/NHibernateAssetData.cs | 14 +++----
OpenSim/Data/NHibernate/NHibernateInventoryData.cs | 46 +++++++++++-----------
OpenSim/Data/NHibernate/NHibernateUserData.cs | 40 +++++++++----------
OpenSim/Data/PrimitiveBaseShapeTableMapper.cs | 4 +-
OpenSim/Data/SQLite/SQLiteAssetData.cs | 2 +-
11 files changed, 65 insertions(+), 65 deletions(-)
(limited to 'OpenSim/Data')
diff --git a/OpenSim/Data/Base/BaseDataReader.cs b/OpenSim/Data/Base/BaseDataReader.cs
index da90f10..b71a966 100644
--- a/OpenSim/Data/Base/BaseDataReader.cs
+++ b/OpenSim/Data/Base/BaseDataReader.cs
@@ -117,7 +117,7 @@ namespace OpenSim.Data.Base
return m_source.GetGuid(m_source.GetOrdinal(name));
}
- public UInt32 GetUInt32(string name )
+ public UInt32 GetUInt32(string name)
{
return (UInt32)GetInt32(name);
}
@@ -129,9 +129,9 @@ namespace OpenSim.Data.Base
return int32;
}
- public Int64 GetInt64(string name)
+ public Int64 GetInt64(string name)
{
- int ordinal = m_source.GetOrdinal( name );
+ int ordinal = m_source.GetOrdinal(name);
long int64 = m_source.GetInt64(ordinal);
return int64;
}
diff --git a/OpenSim/Data/Base/BaseTableMapper.cs b/OpenSim/Data/Base/BaseTableMapper.cs
index ad60009..649b228 100644
--- a/OpenSim/Data/Base/BaseTableMapper.cs
+++ b/OpenSim/Data/Base/BaseTableMapper.cs
@@ -125,7 +125,7 @@ namespace OpenSim.Data.Base
// HACK: This is a temporary function used by TryGetValue().
// Due to a bug in mono 1.2.6, delegate blocks cannot contain
- // a using() block. This has been fixed in SVN, so the next
+ // a using block. This has been fixed in SVN, so the next
// mono release should work.
private void TryGetConnectionValue(DbConnection connection, TPrimaryKey primaryKey, ref TRowMapper result, ref bool success)
{
@@ -137,7 +137,7 @@ namespace OpenSim.Data.Base
{
if (reader.Read())
{
- result = FromReader( CreateReader(reader));
+ result = FromReader(CreateReader(reader));
success = true;
}
else
@@ -165,7 +165,7 @@ namespace OpenSim.Data.Base
// HACK: This is a temporary function used by Remove().
// Due to a bug in mono 1.2.6, delegate blocks cannot contain
- // a using() block. This has been fixed in SVN, so the next
+ // a using block. This has been fixed in SVN, so the next
// mono release should work.
protected virtual void TryDelete(DbConnection connection, TPrimaryKey id, ref int deleted)
{
@@ -215,7 +215,7 @@ namespace OpenSim.Data.Base
// HACK: This is a temporary function used by Update().
// Due to a bug in mono 1.2.6, delegate blocks cannot contain
- // a using() block. This has been fixed in SVN, so the next
+ // a using block. This has been fixed in SVN, so the next
// mono release should work.
protected void TryUpdate(DbConnection connection, TPrimaryKey primaryKey, TRowMapper value, ref int updated)
{
@@ -246,7 +246,7 @@ namespace OpenSim.Data.Base
// HACK: This is a temporary function used by Add().
// Due to a bug in mono 1.2.6, delegate blocks cannot contain
- // a using() block. This has been fixed in SVN, so the next
+ // a using block. This has been fixed in SVN, so the next
// mono release should work.
protected void TryAdd(DbConnection connection, TRowMapper value, ref int added)
{
diff --git a/OpenSim/Data/MSSQLMapper/MSSQLDatabaseMapper.cs b/OpenSim/Data/MSSQLMapper/MSSQLDatabaseMapper.cs
index 4c807b1..bd683f3 100644
--- a/OpenSim/Data/MSSQLMapper/MSSQLDatabaseMapper.cs
+++ b/OpenSim/Data/MSSQLMapper/MSSQLDatabaseMapper.cs
@@ -46,7 +46,7 @@ namespace OpenSim.Data.MSSQLMapper
public override object ConvertToDbType(object value)
{
- if( value is UInt32 )
+ if (value is UInt32)
{
UInt32 tmpVal = (UInt32) value;
Int64 result = Convert.ToInt64(tmpVal);
diff --git a/OpenSim/Data/MySQL/MySQLManager.cs b/OpenSim/Data/MySQL/MySQLManager.cs
index 1f95aad..4455c3b 100644
--- a/OpenSim/Data/MySQL/MySQLManager.cs
+++ b/OpenSim/Data/MySQL/MySQLManager.cs
@@ -512,7 +512,7 @@ namespace OpenSim.Data.MySQL
retval.FirstLifeImage = tmp;
}
- if(reader.IsDBNull(reader.GetOrdinal("webLoginKey")))
+ if (reader.IsDBNull(reader.GetOrdinal("webLoginKey")))
{
retval.WebLoginKey = LLUUID.Zero;
}
diff --git a/OpenSim/Data/MySQL/MySQLUserData.cs b/OpenSim/Data/MySQL/MySQLUserData.cs
index b448715..ab34f15 100644
--- a/OpenSim/Data/MySQL/MySQLUserData.cs
+++ b/OpenSim/Data/MySQL/MySQLUserData.cs
@@ -69,7 +69,7 @@ namespace OpenSim.Data.MySQL
string settingPort = iniFile.ParseFileReadValue("port");
m_usersTableName = iniFile.ParseFileReadValue("userstablename");
- if( m_usersTableName == null )
+ if (m_usersTableName == null)
{
m_usersTableName = "users";
}
diff --git a/OpenSim/Data/MySQLMapper/MySQLDatabaseMapper.cs b/OpenSim/Data/MySQLMapper/MySQLDatabaseMapper.cs
index 37b94fa..b7940b8 100644
--- a/OpenSim/Data/MySQLMapper/MySQLDatabaseMapper.cs
+++ b/OpenSim/Data/MySQLMapper/MySQLDatabaseMapper.cs
@@ -52,7 +52,7 @@ namespace OpenSim.Data.MySQLMapper
public override BaseDataReader CreateReader(IDataReader reader)
{
- return new MySQLDataReader( reader );
+ return new MySQLDataReader(reader);
}
}
}
\ No newline at end of file
diff --git a/OpenSim/Data/NHibernate/NHibernateAssetData.cs b/OpenSim/Data/NHibernate/NHibernateAssetData.cs
index e52f633..875f4e5 100644
--- a/OpenSim/Data/NHibernate/NHibernateAssetData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateAssetData.cs
@@ -97,14 +97,14 @@ namespace OpenSim.Data.NHibernate
string regex = @"no such table: Assets";
Regex RE = new Regex(regex, RegexOptions.Multiline);
try {
- using(ISession session = factory.OpenSession()) {
+ using (ISession session = factory.OpenSession()) {
session.Load(typeof(AssetBase), LLUUID.Zero);
}
} catch (ObjectNotFoundException) {
// yes, we know it's not there, but that's ok
} catch (ADOException e) {
Match m = RE.Match(e.ToString());
- if(m.Success) {
+ if (m.Success) {
// We don't have this table, so create it.
new SchemaExport(cfg).Create(true, true);
}
@@ -113,7 +113,7 @@ namespace OpenSim.Data.NHibernate
override public AssetBase FetchAsset(LLUUID uuid)
{
- using(ISession session = factory.OpenSession()) {
+ using (ISession session = factory.OpenSession()) {
try {
return session.Load(typeof(AssetBase), uuid) as AssetBase;
} catch {
@@ -125,8 +125,8 @@ namespace OpenSim.Data.NHibernate
override public void CreateAsset(AssetBase asset)
{
if (!ExistsAsset(asset.FullID)) {
- using(ISession session = factory.OpenSession()) {
- using(ITransaction transaction = session.BeginTransaction()) {
+ using (ISession session = factory.OpenSession()) {
+ using (ITransaction transaction = session.BeginTransaction()) {
session.Save(asset);
transaction.Commit();
}
@@ -137,8 +137,8 @@ namespace OpenSim.Data.NHibernate
override public void UpdateAsset(AssetBase asset)
{
if (ExistsAsset(asset.FullID)) {
- using(ISession session = factory.OpenSession()) {
- using(ITransaction transaction = session.BeginTransaction()) {
+ using (ISession session = factory.OpenSession()) {
+ using (ITransaction transaction = session.BeginTransaction()) {
session.Update(asset);
transaction.Commit();
}
diff --git a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
index f8e3655..6ee1b4a 100644
--- a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
@@ -95,14 +95,14 @@ namespace OpenSim.Data.NHibernate
string regex = @"no such table: Inventory";
Regex RE = new Regex(regex, RegexOptions.Multiline);
try {
- using(ISession session = factory.OpenSession()) {
+ using (ISession session = factory.OpenSession()) {
session.Load(typeof(InventoryItemBase), LLUUID.Zero);
}
} catch (ObjectNotFoundException) {
// yes, we know it's not there, but that's ok
} catch (ADOException e) {
Match m = RE.Match(e.ToString());
- if(m.Success) {
+ if (m.Success) {
// We don't have this table, so create it.
new SchemaExport(cfg).Create(true, true);
}
@@ -125,7 +125,7 @@ namespace OpenSim.Data.NHibernate
/// A class containing item information
public InventoryItemBase getInventoryItem(LLUUID item)
{
- using(ISession session = factory.OpenSession()) {
+ using (ISession session = factory.OpenSession()) {
try {
return session.Load(typeof(InventoryItemBase), item) as InventoryItemBase;
} catch {
@@ -142,8 +142,8 @@ namespace OpenSim.Data.NHibernate
public void addInventoryItem(InventoryItemBase item)
{
if (!ExistsItem(item.ID)) {
- using(ISession session = factory.OpenSession()) {
- using(ITransaction transaction = session.BeginTransaction()) {
+ using (ISession session = factory.OpenSession()) {
+ using (ITransaction transaction = session.BeginTransaction()) {
session.Save(item);
transaction.Commit();
}
@@ -161,8 +161,8 @@ namespace OpenSim.Data.NHibernate
public void updateInventoryItem(InventoryItemBase item)
{
if (ExistsItem(item.ID)) {
- using(ISession session = factory.OpenSession()) {
- using(ITransaction transaction = session.BeginTransaction()) {
+ using (ISession session = factory.OpenSession()) {
+ using (ITransaction transaction = session.BeginTransaction()) {
session.Update(item);
transaction.Commit();
}
@@ -178,8 +178,8 @@ namespace OpenSim.Data.NHibernate
///
public void deleteInventoryItem(LLUUID itemID)
{
- using(ISession session = factory.OpenSession()) {
- using(ITransaction transaction = session.BeginTransaction()) {
+ using (ISession session = factory.OpenSession()) {
+ using (ITransaction transaction = session.BeginTransaction()) {
session.Delete(itemID);
transaction.Commit();
}
@@ -194,7 +194,7 @@ namespace OpenSim.Data.NHibernate
/// A class containing folder information
public InventoryFolderBase getInventoryFolder(LLUUID folder)
{
- using(ISession session = factory.OpenSession()) {
+ using (ISession session = factory.OpenSession()) {
try {
return session.Load(typeof(InventoryFolderBase), folder) as InventoryFolderBase;
} catch {
@@ -211,8 +211,8 @@ namespace OpenSim.Data.NHibernate
public void addInventoryFolder(InventoryFolderBase folder)
{
if (!ExistsFolder(folder.ID)) {
- using(ISession session = factory.OpenSession()) {
- using(ITransaction transaction = session.BeginTransaction()) {
+ using (ISession session = factory.OpenSession()) {
+ using (ITransaction transaction = session.BeginTransaction()) {
session.Save(folder);
transaction.Commit();
}
@@ -230,8 +230,8 @@ namespace OpenSim.Data.NHibernate
public void updateInventoryFolder(InventoryFolderBase folder)
{
if (ExistsFolder(folder.ID)) {
- using(ISession session = factory.OpenSession()) {
- using(ITransaction transaction = session.BeginTransaction()) {
+ using (ISession session = factory.OpenSession()) {
+ using (ITransaction transaction = session.BeginTransaction()) {
session.Update(folder);
transaction.Commit();
}
@@ -247,8 +247,8 @@ namespace OpenSim.Data.NHibernate
///
public void deleteInventoryFolder(LLUUID folderID)
{
- using(ISession session = factory.OpenSession()) {
- using(ITransaction transaction = session.BeginTransaction()) {
+ using (ISession session = factory.OpenSession()) {
+ using (ITransaction transaction = session.BeginTransaction()) {
session.Delete(folderID.ToString());
transaction.Commit();
}
@@ -324,10 +324,10 @@ namespace OpenSim.Data.NHibernate
/// A List of InventoryItemBase items
public List getInventoryInFolder(LLUUID folderID)
{
- using(ISession session = factory.OpenSession()) {
+ using (ISession session = factory.OpenSession()) {
// try {
ICriteria criteria = session.CreateCriteria(typeof(InventoryItemBase));
- criteria.Add(Expression.Eq("Folder", folderID) );
+ criteria.Add(Expression.Eq("Folder", folderID));
List list = new List();
foreach (InventoryItemBase item in criteria.List())
{
@@ -348,11 +348,11 @@ namespace OpenSim.Data.NHibernate
// see InventoryItemBase.getUserRootFolder
public InventoryFolderBase getUserRootFolder(LLUUID user)
{
- using(ISession session = factory.OpenSession()) {
+ using (ISession session = factory.OpenSession()) {
// try {
ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase));
- criteria.Add(Expression.Eq("ParentID", LLUUID.Zero) );
- criteria.Add(Expression.Eq("Owner", user) );
+ criteria.Add(Expression.Eq("ParentID", LLUUID.Zero));
+ criteria.Add(Expression.Eq("Owner", user));
foreach (InventoryFolderBase folder in criteria.List())
{
return folder;
@@ -372,10 +372,10 @@ namespace OpenSim.Data.NHibernate
/// ID of parent
private void getInventoryFolders(ref List folders, LLUUID parentID)
{
- using(ISession session = factory.OpenSession()) {
+ using (ISession session = factory.OpenSession()) {
// try {
ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase));
- criteria.Add(Expression.Eq("ParentID", parentID) );
+ criteria.Add(Expression.Eq("ParentID", parentID));
foreach (InventoryFolderBase item in criteria.List())
{
folders.Add(item);
diff --git a/OpenSim/Data/NHibernate/NHibernateUserData.cs b/OpenSim/Data/NHibernate/NHibernateUserData.cs
index e680840..2c84ef9 100644
--- a/OpenSim/Data/NHibernate/NHibernateUserData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateUserData.cs
@@ -88,14 +88,14 @@ namespace OpenSim.Data.NHibernate
string regex = @"no such table: UserProfiles";
Regex RE = new Regex(regex, RegexOptions.Multiline);
try {
- using(ISession session = factory.OpenSession()) {
+ using (ISession session = factory.OpenSession()) {
session.Load(typeof(UserProfileData), LLUUID.Zero);
}
} catch (ObjectNotFoundException) {
// yes, we know it's not there, but that's ok
} catch (ADOException e) {
Match m = RE.Match(e.ToString());
- if(m.Success) {
+ if (m.Success) {
// We don't have this table, so create it.
new SchemaExport(cfg).Create(true, true);
}
@@ -106,7 +106,7 @@ namespace OpenSim.Data.NHibernate
{
UserProfileData user = null;
try {
- using(ISession session = factory.OpenSession()) {
+ using (ISession session = factory.OpenSession()) {
user = session.Load(typeof(UserProfileData), uuid) as UserProfileData;
}
// BUG: CATCHALL IS BAD.
@@ -119,7 +119,7 @@ namespace OpenSim.Data.NHibernate
{
UserProfileData user;
// TODO: I'm sure I'll have to do something silly here
- using(ISession session = factory.OpenSession()) {
+ using (ISession session = factory.OpenSession()) {
user = session.Load(typeof(UserProfileData), uuid) as UserProfileData;
user.CurrentAgent = GetAgentByUUID(uuid);
}
@@ -129,8 +129,8 @@ namespace OpenSim.Data.NHibernate
override public void AddNewUserProfile(UserProfileData profile)
{
if (!ExistsUser(profile.ID)) {
- using(ISession session = factory.OpenSession()) {
- using(ITransaction transaction = session.BeginTransaction()) {
+ using (ISession session = factory.OpenSession()) {
+ using (ITransaction transaction = session.BeginTransaction()) {
session.Save(profile);
SetAgentData(profile.ID, profile.CurrentAgent, session);
// TODO: save agent
@@ -166,8 +166,8 @@ namespace OpenSim.Data.NHibernate
override public bool UpdateUserProfile(UserProfileData profile)
{
if (ExistsUser(profile.ID)) {
- using(ISession session = factory.OpenSession()) {
- using(ITransaction transaction = session.BeginTransaction()) {
+ using (ISession session = factory.OpenSession()) {
+ using (ITransaction transaction = session.BeginTransaction()) {
session.Update(profile);
SetAgentData(profile.ID, profile.CurrentAgent, session);
transaction.Commit();
@@ -183,8 +183,8 @@ namespace OpenSim.Data.NHibernate
override public void AddNewUserAgent(UserAgentData agent)
{
- using(ISession session = factory.OpenSession()) {
- using(ITransaction transaction = session.BeginTransaction()) {
+ using (ISession session = factory.OpenSession()) {
+ using (ITransaction transaction = session.BeginTransaction()) {
session.Save(agent);
transaction.Commit();
}
@@ -193,8 +193,8 @@ namespace OpenSim.Data.NHibernate
public void UpdateUserAgent(UserAgentData agent)
{
- using(ISession session = factory.OpenSession()) {
- using(ITransaction transaction = session.BeginTransaction()) {
+ using (ISession session = factory.OpenSession()) {
+ using (ITransaction transaction = session.BeginTransaction()) {
session.Update(agent);
transaction.Commit();
}
@@ -206,7 +206,7 @@ namespace OpenSim.Data.NHibernate
override public UserAgentData GetAgentByUUID(LLUUID uuid)
{
try {
- using(ISession session = factory.OpenSession()) {
+ using (ISession session = factory.OpenSession()) {
return session.Load(typeof(UserAgentData), uuid) as UserAgentData;
}
} catch {
@@ -216,7 +216,7 @@ namespace OpenSim.Data.NHibernate
override public UserProfileData GetUserByName(string fname, string lname)
{
- using(ISession session = factory.OpenSession()) {
+ using (ISession session = factory.OpenSession()) {
ICriteria criteria = session.CreateCriteria(typeof(UserProfileData));
criteria.Add(Expression.Eq("FirstName", fname));
criteria.Add(Expression.Eq("SurName", lname));
@@ -247,11 +247,11 @@ namespace OpenSim.Data.NHibernate
if (querysplit.Length == 2)
{
- using(ISession session = factory.OpenSession()) {
+ using (ISession session = factory.OpenSession()) {
ICriteria criteria = session.CreateCriteria(typeof(UserProfileData));
criteria.Add(Expression.Like("FirstName", querysplit[0]));
criteria.Add(Expression.Like("SurName", querysplit[1]));
- foreach(UserProfileData profile in criteria.List())
+ foreach (UserProfileData profile in criteria.List())
{
AvatarPickerAvatar user = new AvatarPickerAvatar();
user.AvatarID = profile.ID;
@@ -280,7 +280,7 @@ namespace OpenSim.Data.NHibernate
{
UserAppearance appearance;
// TODO: I'm sure I'll have to do something silly here
- using(ISession session = factory.OpenSession()) {
+ using (ISession session = factory.OpenSession()) {
appearance = session.Load(typeof(UserAppearance), user) as UserAppearance;
}
return appearance;
@@ -289,7 +289,7 @@ namespace OpenSim.Data.NHibernate
private bool ExistsAppearance(LLUUID uuid)
{
UserAppearance appearance;
- using(ISession session = factory.OpenSession()) {
+ using (ISession session = factory.OpenSession()) {
appearance = session.Load(typeof(UserAppearance), uuid) as UserAppearance;
}
return (appearance == null) ? false : true;
@@ -299,8 +299,8 @@ namespace OpenSim.Data.NHibernate
override public void UpdateUserAppearance(LLUUID user, UserAppearance appearance)
{
bool exists = ExistsAppearance(user);
- using(ISession session = factory.OpenSession()) {
- using(ITransaction transaction = session.BeginTransaction()) {
+ using (ISession session = factory.OpenSession()) {
+ using (ITransaction transaction = session.BeginTransaction()) {
if (exists) {
session.Update(appearance);
} else {
diff --git a/OpenSim/Data/PrimitiveBaseShapeTableMapper.cs b/OpenSim/Data/PrimitiveBaseShapeTableMapper.cs
index fe49978..cb3d33d 100644
--- a/OpenSim/Data/PrimitiveBaseShapeTableMapper.cs
+++ b/OpenSim/Data/PrimitiveBaseShapeTableMapper.cs
@@ -143,7 +143,7 @@ namespace OpenSim.Data
PrimitiveBaseShape shape = new PrimitiveBaseShape();
PrimitiveBaseShapeRowMapper mapper = new PrimitiveBaseShapeRowMapper(m_schema, shape);
- mapper.FillObject( reader );
+ mapper.FillObject(reader);
return mapper;
}
@@ -162,7 +162,7 @@ namespace OpenSim.Data
private PrimitiveBaseShapeRowMapper CreateRowMapper(Guid sceneObjectPartId, PrimitiveBaseShape primitiveBaseShape)
{
- PrimitiveBaseShapeRowMapper mapper = new PrimitiveBaseShapeRowMapper( m_schema, primitiveBaseShape );
+ PrimitiveBaseShapeRowMapper mapper = new PrimitiveBaseShapeRowMapper(m_schema, primitiveBaseShape);
mapper.SceneObjectPartId = sceneObjectPartId;
return mapper;
}
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs
index fa5d5e2..f3a4bd1 100644
--- a/OpenSim/Data/SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs
@@ -155,7 +155,7 @@ namespace OpenSim.Data.SQLite
cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid)));
using (IDataReader reader = cmd.ExecuteReader())
{
- if(reader.Read())
+ if (reader.Read())
{
reader.Close();
return true;
--
cgit v1.1