示例#1
2
 public Config()
 {
     _parms = ParameterBasis();  // alloc table
     db = new DBConfig(_parms);  // set up DB config
     ReadAppSettings(); // get the DB settings
 }
示例#2
0
 public bool LoadPersistenceConfig(DBConfig mynewdb)
 {
     pest = new Persistence(Logger(LMLoggers.AppSection.DB), mynewdb);
     DB = new INCCDB();
     lmdb = new LMDB();
     bool there = false;
     try
     {
         there = pest.IsItThere;
         if (!there)
         {
             Console.WriteLine("Database using " + mynewdb.MyDBConnectionString + " unavailable");
             Console.WriteLine(pest.IsItThereStr);
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine("Database unavailable " + ex.Message);
         if (!string.IsNullOrEmpty(pest.IsItThereStr))
             Console.WriteLine(pest.IsItThereStr);
     }
     if (there)
         appctx = LMDB.AppContext;
     return there;
 }
示例#3
0
文件: Pest.cs 项目: tempbottle/INCC6
 public Persistence(LMLoggers.LognLM logger, DBConfig cfg)
 {
     this.cfg = cfg;
     this.logger = logger;
     DBMain.pest = this;
 }
示例#4
0
 public void LoadPersistenceConfig(DBConfig mynewdb)
 {
     pest = new Persistence(Logger(LMLoggers.AppSection.DB), mynewdb);
     DB = new INCCDB();
     DB.Populate(pest);
     lmdb = new ListModeDB.LMDB();
     lmdb.Populate(pest);
     appctx = ListModeDB.LMDB.AppContext;
 }