We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 399406c commit 0a9068eCopy full SHA for 0a9068e
src/SIL.Harmony/DataModel.cs
@@ -251,6 +251,15 @@ public async Task<ObjectSnapshot> GetLatestSnapshotByObjectId(Guid entityId)
251
throw new ArgumentException($"unable to find snapshot for entity {entityId}");
252
}
253
254
+ public async IAsyncEnumerable<ObjectSnapshot> GetLatestSnapshots()
255
+ {
256
+ await using var repo = await _crdtRepositoryFactory.CreateRepository();
257
+ await foreach (var snapshot in repo.CurrentSnapshots().AsAsyncEnumerable())
258
259
+ yield return snapshot;
260
+ }
261
262
+
263
public async Task<T?> GetLatest<T>(Guid objectId) where T : class
264
{
265
return await _crdtRepositoryFactory.Execute(repo => repo.GetCurrent<T>(objectId));
0 commit comments