1234567891011121314151617181920212223242526 |
- using System.Linq;
- using System.Collections.Generic;
- using SQLite;
- namespace Vinno.vCloud.Disk.Database
- {
- public class SqlExecute
- {
- private static object locker = new object();
- private static SQLiteConnection _sQLiteConnection;
- public static SQLiteConnection DB {
- get
- {
- if (_sQLiteConnection == null || _sQLiteConnection.Handle.IsClosed)
- {
- lock (locker)
- {
- var helper = SqliteConnection.GetHelper();
- _sQLiteConnection = helper.DB;
- }
- }
- return _sQLiteConnection;
- }
- }
- }
- }
|