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

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

                return(entry.Connection);
            }
        }
Esempio n. 2
0
 public Entry(SQLiteConnectionString connectionString)
 {
     ConnectionString = connectionString;
     Connection       = new SQLiteConnectionWithLock(connectionString);
 }
Esempio n. 3
0
 public SQLiteConnectionWithLock(SQLiteConnectionString connectionString,
                                 IDictionary <string, TableMapping> tableMappings = null,
                                 IDictionary <Type, string> extraTypeMappings     = null)
     : base(connectionString.DatabasePath, connectionString.OpenFlags, connectionString.StoreDateTimeAsTicks, connectionString.Serializer, tableMappings, extraTypeMappings, connectionString.Resolver)
 {
 }