public static void RunInLock(this SQLiteConnectionWithLock connection, Action action) { if (action == null) { throw new ArgumentNullException(nameof(action)); } using (connection.Lock()) { //var savepoint = this.SaveTransactionPoint(); try { action(); //this.Release(savepoint); } catch (Exception) { //this.RollbackTo(savepoint); throw; } } }
public void OnApplicationSuspended() { Connection.Dispose(); Connection = null; }
public Entry(SQLiteConnectionString connectionString) { ConnectionString = connectionString; Connection = new SQLiteConnectionWithLock(connectionString); }
public Entry(SQLiteConnectionString connectionString, SQLiteOpenFlags openFlags) { ConnectionString = connectionString; Connection = new SQLiteConnectionWithLock(connectionString, openFlags); }