Skip to content

Commit

Permalink
IdentityFromEvent interface needs to have IdentityFromEvent as well
Browse files Browse the repository at this point in the history
  • Loading branch information
erdtsieck committed Feb 6, 2025
1 parent 11d8dc6 commit 9a6aa64
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Marten/Events/Aggregation/AggregationRuntime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ public IAggregateCache<TId, TDoc> CacheFor(Tenant tenant)
}
}

public TId IdentityFromEvent(IEvent e)
public TId IdentityFromEvent(StreamIdentity streamIdentity, IEvent e)
{
return _identitySource(e);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Marten/Events/Aggregation/IAggregationRuntime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ ValueTask ApplyChangesAsync(DocumentSessionBase session,

IAggregateCache<TId, TDoc> CacheFor(Tenant tenant);

TId IdentityFromEvent(IEvent e);
TId IdentityFromEvent(StreamIdentity streamIdentity, IEvent e);
}
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ private async Task collateAndPostSlices(IAsyncEnumerable<IEvent> events, ITarget
EventSlice<TDoc, TId> slice = null;
await foreach (var e in events)
{
var aggregateId = _runtime.IdentityFromEvent(e);
var aggregateId = _runtime.IdentityFromEvent(_session.Options.Events.StreamIdentity, e);
slice ??= new EventSlice<TDoc, TId>(aggregateId, _session);

if (!slice.Id.Equals(aggregateId))
Expand Down

0 comments on commit 9a6aa64

Please sign in to comment.