diff options
Diffstat (limited to 'OpenGrid.Framework.Data.DB4o/DB4oManager.cs')
-rw-r--r-- | OpenGrid.Framework.Data.DB4o/DB4oManager.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/OpenGrid.Framework.Data.DB4o/DB4oManager.cs b/OpenGrid.Framework.Data.DB4o/DB4oManager.cs new file mode 100644 index 0000000..f889636 --- /dev/null +++ b/OpenGrid.Framework.Data.DB4o/DB4oManager.cs | |||
@@ -0,0 +1,27 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using Db4objects.Db4o; | ||
5 | using OpenGrid.Framework.Data; | ||
6 | using libsecondlife; | ||
7 | |||
8 | namespace OpenGrid.Framework.Data.DB4o | ||
9 | { | ||
10 | class DB4oManager | ||
11 | { | ||
12 | public Dictionary<LLUUID, SimProfileData> profiles = new Dictionary<LLUUID, SimProfileData>(); | ||
13 | |||
14 | public DB4oManager(string db4odb) | ||
15 | { | ||
16 | IObjectContainer database; | ||
17 | database = Db4oFactory.OpenFile(db4odb); | ||
18 | IObjectSet result = database.Get(typeof(SimProfileData)); | ||
19 | foreach(SimProfileData row in result) { | ||
20 | profiles.Add(row.UUID, row); | ||
21 | } | ||
22 | database.Close(); | ||
23 | } | ||
24 | |||
25 | |||
26 | } | ||
27 | } | ||