Пример #1
0
        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;
                }
            }
        }
Пример #2
0
 public void OnApplicationSuspended()
 {
     Connection.Dispose();
     Connection = null;
 }
Пример #3
0
 public Entry(SQLiteConnectionString connectionString)
 {
     ConnectionString = connectionString;
     Connection       = new SQLiteConnectionWithLock(connectionString);
 }
Пример #4
0
 public Entry(SQLiteConnectionString connectionString, SQLiteOpenFlags openFlags)
 {
     ConnectionString = connectionString;
     Connection       = new SQLiteConnectionWithLock(connectionString, openFlags);
 }