示例#1
0
        /// <summary>
        /// Opens the database instance with the specified file name.
        /// </summary>
        /// <param name="fileName">Name of the file.</param>
        /// <returns>IOdb.</returns>
        public static IOdb Open(string fileName)
        {
            Monitor.Enter(string.Intern(Path.GetFullPath(fileName)));

            _last = fileName;
            return(Odb.GetInstance(fileName));
        }
示例#2
0
        internal static Odb GetInMemoryInstance()
        {
            var odb = new Odb();

            odb.TriggerManagerFor <object>().AddSelectTrigger(new EnrichWithOidTrigger());

            return(odb);
        }
示例#3
0
        internal static Odb GetInstance(string fileName)
        {
            var odb = new Odb(fileName);

            odb.TriggerManagerFor <object>().AddSelectTrigger(new EnrichWithOidTrigger());

            return(odb);
        }
示例#4
0
 /// <summary>
 /// Opens a database in the In-Memory mode.
 /// </summary>
 /// <returns>IOdb implementation.</returns>
 public static IOdb OpenInMemory()
 {
     return(Odb.GetInMemoryInstance());
 }