From 67e12b95ea7b68f4904a7484d77ecfd787d16d0c Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Tue, 30 Oct 2007 09:05:31 +0000 Subject: * Optimized usings * Shortened type references * Removed redundant 'this' qualifier --- OpenSim/Framework/Data.DB4o/DB4oManager.cs | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'OpenSim/Framework/Data.DB4o/DB4oManager.cs') diff --git a/OpenSim/Framework/Data.DB4o/DB4oManager.cs b/OpenSim/Framework/Data.DB4o/DB4oManager.cs index 9e8a03f..033413a 100644 --- a/OpenSim/Framework/Data.DB4o/DB4oManager.cs +++ b/OpenSim/Framework/Data.DB4o/DB4oManager.cs @@ -29,23 +29,23 @@ using System; using System.Collections.Generic; using Db4objects.Db4o; using libsecondlife; -using OpenSim.Framework; namespace OpenSim.Framework.Data.DB4o { /// /// A Database manager for Db4o /// - class DB4oGridManager + internal class DB4oGridManager { /// /// A list of the current regions connected (in-memory cache) /// public Dictionary simProfiles = new Dictionary(); + /// /// Database File Name /// - string dbfl; + private string dbfl; /// /// Creates a new grid storage manager @@ -56,7 +56,7 @@ namespace OpenSim.Framework.Data.DB4o dbfl = db4odb; IObjectContainer database; database = Db4oFactory.OpenFile(dbfl); - IObjectSet result = database.Get(typeof(RegionProfileData)); + IObjectSet result = database.Get(typeof (RegionProfileData)); // Loads the file into the in-memory cache foreach (RegionProfileData row in result) { @@ -94,23 +94,22 @@ namespace OpenSim.Framework.Data.DB4o return false; } } - - } /// /// A manager for the DB4o database (user profiles) /// - class DB4oUserManager + internal class DB4oUserManager { /// /// A list of the user profiles (in memory cache) /// public Dictionary userProfiles = new Dictionary(); + /// /// Database filename /// - string dbfl; + private string dbfl; /// /// Initialises a new DB manager @@ -122,7 +121,7 @@ namespace OpenSim.Framework.Data.DB4o IObjectContainer database; database = Db4oFactory.OpenFile(dbfl); // Load to cache - IObjectSet result = database.Get(typeof(UserProfileData)); + IObjectSet result = database.Get(typeof (UserProfileData)); foreach (UserProfileData row in result) { if (userProfiles.ContainsKey(row.UUID)) @@ -144,7 +143,7 @@ namespace OpenSim.Framework.Data.DB4o /// The profile to update /// true on success, false on fail to persist to db public bool UpdateRecord(UserProfileData record) - { + { if (userProfiles.ContainsKey(record.UUID)) { userProfiles[record.UUID] = record; @@ -168,4 +167,4 @@ namespace OpenSim.Framework.Data.DB4o } } } -} +} \ No newline at end of file -- cgit v1.1