Esempio n. 1
0
        public SQLiteConnectionWithLock GetConnection(SQLiteConnectionString connectionString)
        {
            lock (_entriesLock) {
                Entry  entry;
                string key = connectionString.ConnectionString;

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

                return(entry.Connection);
            }
        }
Esempio n. 2
0
 public SQLiteAsyncConnection(string databasePath, bool storeDateTimeAsTicks = false)
 {
     _connectionString = new SQLiteConnectionString(databasePath, storeDateTimeAsTicks);
 }
 public SQLiteConnectionWithLock(SQLiteConnectionString connectionString)
     : base(connectionString.DatabasePath, connectionString.StoreDateTimeAsTicks)
 {
 }
Esempio n. 4
0
 public Entry(SQLiteConnectionString connectionString)
 {
     ConnectionString = connectionString;
     Connection       = new SQLiteConnectionWithLock(connectionString);
 }