aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGrid.Framework.Data.DB4o/DB4oManager.cs
blob: f88963641f35d554bef7973f385d39be3d394101 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System;
using System.Collections.Generic;
using System.Text;
using Db4objects.Db4o;
using OpenGrid.Framework.Data;
using libsecondlife;

namespace OpenGrid.Framework.Data.DB4o
{
    class DB4oManager
    {
        public Dictionary<LLUUID, SimProfileData> profiles = new Dictionary<LLUUID, SimProfileData>();
        
        public DB4oManager(string db4odb)
        {
            IObjectContainer database;
            database = Db4oFactory.OpenFile(db4odb);
            IObjectSet result = database.Get(typeof(SimProfileData));
            foreach(SimProfileData row in result) {
                profiles.Add(row.UUID, row);
            }
            database.Close();
        }


    }
}