Example #1
0
 public static void Initialize(string envDir, string dbFile)
 {
     if (!s_Initialized) {
         lock (s_syncRoot) {
             if (!s_Initialized) {
                 BDB46.Env env = new BDB46.Env (envDir);
                 BDB46 storage = new BDB46 (dbFile, true, DBFormat.Recno, false, env);
                 s_Storage = storage;
             }
         }
     }
 }
Example #2
0
 public BDB46 Get(string name, DBFormat format)
 {
     if (!m_Storage.ContainsKey (name)) {
         if (m_StorageLock.WaitOne ()) {
             if (!m_Storage.ContainsKey (name)) {
                 string file = Path.Combine (Paths.ApplicationData, String.Format ("{0}.db", name));
                 var env = new BDB46.Env (Paths.ApplicationData);
                 var storage = new BDB46 (file, true, format, false, env);
                 m_Storage [name] = storage;
             }
         }
     }
     return m_Storage [name];
 }
Example #3
0
			internal Cursor(BDB46 parent, IntPtr cursorp) {
				this.cursorp = cursorp;
				this.parent = parent;

				int offset = 208;
				if (IntPtr.Size == 8)
					offset = 312;
				
				funcs = (cursorstruct)Marshal.PtrToStructure((IntPtr)((int)cursorp + offset), typeof(cursorstruct));
			}