Beispiel #1
0
 public Environment(string home, EnvironmentConfig config)
 {
     this.env_ = null;
     this.envClosed_ = true;
     this.env_ = config.openDbEnv(home);
     this.envClosed_ = false;
     this.config_ = config;
 }
Beispiel #2
0
 internal static IntPtr getCPtr(DbEnv obj)
 {
     if (obj != null)
     {
         return(obj.swigCPtr);
     }
     return(IntPtr.Zero);
 }
Beispiel #3
0
 internal Environment(DbEnv e)
 {
     this.env_ = e;
     this.envClosed_ = true;
     this.config_ = null;
 }
Beispiel #4
0
 public static extern void DbEnv_set_errcall(IntPtr jarg1, DbEnv.ErrorCallbackDelegate jarg2);
Beispiel #5
0
 public XmlManager(DbEnv dbEnv, uint flags) : this(DbXmlPINVOKE.new_XmlManager__SWIG_2(DbEnv.getCPtr(dbEnv), flags), true)
 {
 }
Beispiel #6
0
 internal static IntPtr getCPtr(DbEnv obj)
 {
     if (obj != null)
     {
         return obj.swigCPtr;
     }
     return IntPtr.Zero;
 }
Beispiel #7
0
 public XmlManager(DbEnv dbEnv, uint flags)
     : this(DbXmlPINVOKE.new_XmlManager__SWIG_2(DbEnv.getCPtr(dbEnv), flags), true)
 {
 }
Beispiel #8
0
 internal void SetFromDbEnv(DbEnv env)
 {
     string str;
     this.flags_ = env.get_open_flags();
     this.cachesize_ = (int) ((0x40000000 * env.get_cachesize_gbytes()) + env.get_cachesize_bytes());
     this.nCaches_ = (int) env.get_cachesize_ncache();
     StringArrayIterator iterator = env.get_data_dirs();
     ArrayList list = new ArrayList();
     while ((str = iterator.next()) != null)
     {
         list.Add(str);
     }
     this.dataDirs_ = (string[]) list.ToArray(typeof(string));
     this.errPrefix_ = env.get_errpfx();
 }
Beispiel #9
0
 internal EnvironmentConfig(DbEnv env)
     : this()
 {
     this.SetFromDbEnv(env);
 }
Beispiel #10
0
 internal DbEnv createDbEnv()
 {
     DbEnv env = new DbEnv(0);
     this.configureDbEnv(env, false);
     return env;
 }
Beispiel #11
0
 internal void configureDbEnv(DbEnv env, bool isOpen)
 {
     if (!isOpen)
     {
         env.set_cachesize(0, (uint) this.cachesize_, this.nCaches_);
     }
     if (this.dataDirs_ != null)
     {
         foreach (string str in this.dataDirs_)
         {
             env.set_data_dir(str);
         }
     }
     if (this.encryptPassword_ != null)
     {
         env.set_encrypt(this.encryptPassword_, 0);
     }
     if (this.errPrefix_ != null)
     {
         env.set_errpfx(this.errPrefix_);
     }
     if ((this.errCallback_ != null) || (this.errWriter_ != null))
     {
         env.set_errcall(this.dbenvDelegate_);
     }
 }