Exemple #1
0
 public SQLiteConnectionWithLock(SQLiteConnectionString connectionString, CNISS_Integration_Test.SQLite.SQLiteOpenFlags openFlags)
     : base(connectionString.DatabasePath, openFlags, connectionString.StoreDateTimeAsTicks)
 {
 }
Exemple #2
0
 public SQLiteAsyncConnection(string databasePath, CNISS_Integration_Test.SQLite.SQLiteOpenFlags openFlags, bool storeDateTimeAsTicks = false)
 {
     _openFlags        = openFlags;
     _connectionString = new SQLiteConnectionString(databasePath, storeDateTimeAsTicks);
 }
Exemple #3
0
        public SQLiteConnectionWithLock GetConnection(SQLiteConnectionString connectionString, CNISS_Integration_Test.SQLite.SQLiteOpenFlags openFlags)
        {
            lock (_entriesLock) {
                Entry  entry;
                string key = connectionString.ConnectionString;

                if (!_entries.TryGetValue(key, out entry))
                {
                    entry         = new Entry(connectionString, openFlags);
                    _entries[key] = entry;
                }

                return(entry.Connection);
            }
        }
Exemple #4
0
 public Entry(SQLiteConnectionString connectionString, CNISS_Integration_Test.SQLite.SQLiteOpenFlags openFlags)
 {
     ConnectionString = connectionString;
     Connection       = new SQLiteConnectionWithLock(connectionString, openFlags);
 }