Esempio n. 1
0
 //---------------------------------------------------------------------
 public EntitySaverCouchbase(EntityMgr entity_mgr, Entity entity, IDbCouchbase db_couchbase, bool recursive = false)
     : base(entity_mgr)
 {
     mDbCouchbase = db_couchbase;
     mRecursive   = recursive;
     mEntityData  = entity.genEntityData4SaveDb();
 }
Esempio n. 2
0
 //---------------------------------------------------------------------
 public EntityLoaderCouchbase(EntityMgr entity_mgr, Entity parent,
                              string entity_type, string entity_guid, IDbCouchbase db_couchbase, bool recursive = false)
     : base(entity_mgr, parent, recursive)
 {
     mDbCouchbase = db_couchbase;
     mDbKey       = entity_type + mEntityMgr.NodeTypeAsString + "_" + entity_guid;
 }
Esempio n. 3
0
        public static IDbCouchbase setupDbCouchbase(string db_dll_file, ref _tCouchbaseInfo couchbase_info)
        {
            Assembly     ass = Assembly.LoadFrom(db_dll_file);              // 加载dll文件
            Type         tp  = ass.GetType(DbClass.DbCouchbase.ToString()); // 获取类名,命名空间+类名
            IDbCouchbase dc  = (IDbCouchbase)Activator.CreateInstance(tp);  // 建立实例

            dc.setup(ref couchbase_info);
            return(dc);
        }