Esempio n. 1
0
        public DbStore(ConfDb config)
        {
            var historyFile = Path.GetFullPath(config.Path);

            database = new LiteDatabase(historyFile);

            metaTable = database.GetCollection <DbMetaData>(DbMetaInformationTable);
        }
Esempio n. 2
0
        public DbStore(ConfDb config)
        {
            var historyFileConnectionString = $"Filename={Path.GetFullPath(config.Path)};";

            if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
            {
                historyFileConnectionString += "Mode=Exclusive;";
            }
            database = new LiteDatabase(historyFileConnectionString);

            metaTable = database.GetCollection <DbMetaData>(DbMetaInformationTable);
        }