Implementing the SQLiteStorage class
Now back to the FileStorage.Portable
project. Let's add another file into the Storage
folder called SQLiteStorage.cs
and implement the private
variables:
public class SQLiteStorage : ISQLiteStorage { #region Private Properties private readonly AsyncLock asyncLock = new AsyncLock(); private readonly object lockObject = new object(); private SQLiteConnectionWithLock _conn; private SQLiteAsyncConnection _dbAsyncConn; private readonly ISQLitePlatform _sqlitePlatform; private string _dbPath; private readonly ILogger _log; private readonly string _tag; #endregion }
We have a private AsyncLock
object as we will be doing synchronous and asynchronous locking implementations. We then have two SQLite objects for creating ...
Get Xamarin Blueprints now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.