public IConnection Create(IConnectionProfile profile)
 {
     Db4oLocalConnection connection = null;
     if (profile is RemoteConnectionProfile)
         connection = new Db4oRemoteConnection();
     else
     {
         connection = new Db4oLocalConnection();
     }
     connection.Profile = profile;
     return connection;
 }
示例#2
0
        public Db4oStoredClass(Db4objects.Db4o.Ext.IStoredClass clazz, Db4oLocalConnection connection)
        {
            this.connection = connection;
            Name = clazz.GetName();
            genericClass = connection.GetGenericClass(clazz.GetName());
            List<Field> list = new List<Field>();

            IStoredField[] storedFields = clazz.GetStoredFields();
            foreach (IStoredField field in storedFields)
            {
                list.Add(new Db4oField(field));
            }
            Fields = list;
        }