forked from ASOS/SimpleEventStore
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support reading from last snapshot event
- Loading branch information
Dave Thompson
committed
Oct 31, 2018
1 parent
e0e4763
commit cb1d2ea
Showing
7 changed files
with
129 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
namespace SimpleEventStore.Tests.Events | ||
{ | ||
public class OrderSnapshot | ||
{ | ||
public string OrderId { get; private set; } | ||
|
||
public OrderSnapshot(string orderId) | ||
{ | ||
OrderId = orderId; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace SimpleEventStore.InMemory | ||
{ | ||
static class EnumerableExtensions | ||
{ | ||
public static IEnumerable<T> TakeUntilImmediatelyAfter<T>(this IEnumerable<T> source, Predicate<T> stopImmediatelyAfter) | ||
{ | ||
foreach (var item in source) | ||
{ | ||
yield return item; | ||
|
||
if (stopImmediatelyAfter(item)) | ||
{ | ||
yield break; | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters