Exemplo 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);
            }
        }
Exemplo n.º 2
0
 public SQLiteAsyncConnection(string databasePath, bool storeDateTimeAsTicks = false)
 {
     _connectionString = new SQLiteConnectionString(databasePath, storeDateTimeAsTicks);
 }
Exemplo n.º 3
0
 public SQLiteConnectionWithLock(SQLiteConnectionString connectionString)
     : base(connectionString.DatabasePath, connectionString.StoreDateTimeAsTicks)
 {
 }
Exemplo n.º 4
0
 public Entry(SQLiteConnectionString connectionString)
 {
     ConnectionString = connectionString;
     Connection       = new SQLiteConnectionWithLock(connectionString);
 }