/// <summary> /// InMemory! /// </summary> /// <returns></returns> public static ITableSnapshotBuilder EmptySnapshot() { TableSnapshotBuilder b = new TableSnapshotBuilder(); b.TableSnapshotDelegate = () => { SqliteDatabaseProvider prov = SqliteDatabaseProvider.CreateInMemoryDatabase(); RepositoryListSnapshotBuilder.CreateTable(prov); SqliteTableSnapshot ts = new SqliteTableSnapshot(prov, RepositoryTableSnapshot.TableName, RepositoryTableSnapshot.PrimaryKey); return(ts); }; return(b); }
public static ITableSnapshotBuilder CreateInMemorySnapshotFromRequest(IEnumerable <string> jsonResponses) { Guard.ArgumentNotNull(jsonResponses, nameof(jsonResponses)); TableSnapshotBuilder b = new TableSnapshotBuilder(); b.TableSnapshotDelegate = () => { SqliteDatabaseProvider prov = SqliteDatabaseProvider.CreateInMemoryDatabase(); RepositoryListSnapshotBuilder.Fill(prov, jsonResponses); SqliteTableSnapshot ts = new SqliteTableSnapshot(prov, RepositoryTableSnapshot.TableName, RepositoryTableSnapshot.PrimaryKey); return(ts); }; return(b); }