說我有這樣的代碼:JOliver EventStore快照服務
private void CreateSnapshots(IEnumerable<StreamHead> streams)
{
foreach (StreamHead head in streams)
{
IAggregate aggregate = ???;
IMemento memento = aggregate.GetSnapshot();
var snapshot = new Snapshot(head.StreamId, head.SnapshotRevision + 1, memento);
eventStore.AddSnapshot(snapshot);
observer.Notify(new SnapshotTaken(head.StreamId, head.HeadRevision));
}
}
我怎麼知道當前流加載哪些聚集?我也在使用CommonDomain。那裏有東西嗎?
謝謝
只注意到OptimisticEventStore.OpenStream(Guid streamId,int minRevision,int maxRevision)不會對提交標頭做任何事情。問題在哪裏? – 2011-06-08 20:53:29
- > PopulateStream(int minRevision,int maxRevision,IEnumerable提交) –
2011-06-08 20:54:11