/// <summary>
        /// Initializes a new instance of the <see cref="LocklessSQLiteStore"/> class.
        /// </summary>
        /// <param name="persistenceConfig">The persistence configuration.</param>
        public LocklessSQLiteStore(IPersistenceConfig persistenceConfig)
        {
            Contracts.Requires.That(persistenceConfig != null);

            this.connection = new SQLiteAsyncConnection(() => new SQLiteConnectionWithLock(
                                                            SQLitePlatform.New(), new SQLiteConnectionString(persistenceConfig.DatabasePath, false)));
        }
        /// <inheritdoc />
        public async Task MigrateAsync(CancellationToken cancellation = default(CancellationToken))
        {
            cancellation.ThrowIfCancellationRequested();
            var connection = new SQLiteAsyncConnection(() => new SQLiteConnectionWithLock(
                                                           SQLitePlatform.New(), new SQLiteConnectionString(this.databasePath, false)));

            cancellation.ThrowIfCancellationRequested();
            await connection.CreateTablesAsync(cancellation, this.entityTypes).DontMarshallContext();
        }
 public void InitializePlatform()
 {
     IDbPlatform dbPlatform = new SQLitePlatform();
     Assert.IsInstanceOfType(typeof(SQLiteFactory), dbPlatform.ProviderFactory);
 }