From 1069c0c3537dc1b60e7a820590ebbbd804df99e5 Mon Sep 17 00:00:00 2001 From: Lejdholt Date: Thu, 28 Nov 2024 15:26:50 +0100 Subject: [PATCH 1/2] It is global position in FromSucess. --- src/Core/src/Eventuous.Application/Result.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Core/src/Eventuous.Application/Result.cs b/src/Core/src/Eventuous.Application/Result.cs index 7f9799bd..b2377b2d 100644 --- a/src/Core/src/Eventuous.Application/Result.cs +++ b/src/Core/src/Eventuous.Application/Result.cs @@ -63,10 +63,10 @@ public bool TryGetError([NotNullWhen(true)] out Error? error) { /// /// State instance /// List of new events - /// Position of the last new event in the log + /// Global position of the last new event in the log /// New result instance - public static Result FromSuccess(TState state, IEnumerable changes, ulong streamPosition) - => new() { _value = new(state, changes, streamPosition) }; + public static Result FromSuccess(TState state, IEnumerable changes, ulong globalPosition) + => new() { _value = new(state, changes, globalPosition) }; /// /// Creates a result instance from an error @@ -151,8 +151,8 @@ public async Task MatchAsync(Func matchOk, Func matchErro /// /// New state instance /// Collection of new events - /// Position of the last new event in the log - public record Ok(TState State, IEnumerable Changes, ulong StreamPosition); + /// Global position of the last new event in the log + public record Ok(TState State, IEnumerable Changes, ulong GlobalPosition); /// /// State of an error result From c3f061013ffbd49e9b0f437d7f26a73816266af7 Mon Sep 17 00:00:00 2001 From: Lejdholt Date: Sat, 30 Nov 2024 21:50:24 +0100 Subject: [PATCH 2/2] update verified files --- ...re.Mvc.Testing.WebApplicationFactory`1[Program].verified.txt | 2 +- ...re.Mvc.Testing.WebApplicationFactory`1[Program].verified.txt | 2 +- ...re.Mvc.Testing.WebApplicationFactory`1[Program].verified.txt | 2 +- ...re.Mvc.Testing.WebApplicationFactory`1[Program].verified.txt | 2 +- ...re.Mvc.Testing.WebApplicationFactory`1[Program].verified.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Extensions/test/Eventuous.Tests.Extensions.AspNetCore/AggregateCommandsTests.MapAggregateContractToCommandExplicitlyWithoutRouteWithGenericAttr_factory=Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1[Program].verified.txt b/src/Extensions/test/Eventuous.Tests.Extensions.AspNetCore/AggregateCommandsTests.MapAggregateContractToCommandExplicitlyWithoutRouteWithGenericAttr_factory=Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1[Program].verified.txt index 94228fd7..9a9f373b 100644 --- a/src/Extensions/test/Eventuous.Tests.Extensions.AspNetCore/AggregateCommandsTests.MapAggregateContractToCommandExplicitlyWithoutRouteWithGenericAttr_factory=Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1[Program].verified.txt +++ b/src/Extensions/test/Eventuous.Tests.Extensions.AspNetCore/AggregateCommandsTests.MapAggregateContractToCommandExplicitlyWithoutRouteWithGenericAttr_factory=Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1[Program].verified.txt @@ -23,5 +23,5 @@ eventType: V1.BookingImported } ], - streamPosition: 0 + globalPosition: 0 } \ No newline at end of file diff --git a/src/Extensions/test/Eventuous.Tests.Extensions.AspNetCore/AggregateCommandsTests.MapAggregateContractToCommandExplicitlyWithoutRoute_factory=Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1[Program].verified.txt b/src/Extensions/test/Eventuous.Tests.Extensions.AspNetCore/AggregateCommandsTests.MapAggregateContractToCommandExplicitlyWithoutRoute_factory=Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1[Program].verified.txt index 94228fd7..9a9f373b 100644 --- a/src/Extensions/test/Eventuous.Tests.Extensions.AspNetCore/AggregateCommandsTests.MapAggregateContractToCommandExplicitlyWithoutRoute_factory=Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1[Program].verified.txt +++ b/src/Extensions/test/Eventuous.Tests.Extensions.AspNetCore/AggregateCommandsTests.MapAggregateContractToCommandExplicitlyWithoutRoute_factory=Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1[Program].verified.txt @@ -23,5 +23,5 @@ eventType: V1.BookingImported } ], - streamPosition: 0 + globalPosition: 0 } \ No newline at end of file diff --git a/src/Extensions/test/Eventuous.Tests.Extensions.AspNetCore/AggregateCommandsTests.MapAggregateContractToCommandExplicitly_factory=Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1[Program].verified.txt b/src/Extensions/test/Eventuous.Tests.Extensions.AspNetCore/AggregateCommandsTests.MapAggregateContractToCommandExplicitly_factory=Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1[Program].verified.txt index 94228fd7..9a9f373b 100644 --- a/src/Extensions/test/Eventuous.Tests.Extensions.AspNetCore/AggregateCommandsTests.MapAggregateContractToCommandExplicitly_factory=Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1[Program].verified.txt +++ b/src/Extensions/test/Eventuous.Tests.Extensions.AspNetCore/AggregateCommandsTests.MapAggregateContractToCommandExplicitly_factory=Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1[Program].verified.txt @@ -23,5 +23,5 @@ eventType: V1.BookingImported } ], - streamPosition: 0 + globalPosition: 0 } \ No newline at end of file diff --git a/src/Extensions/test/Eventuous.Tests.Extensions.AspNetCore/AggregateCommandsTests.MapEnrichedCommand_factory=Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1[Program].verified.txt b/src/Extensions/test/Eventuous.Tests.Extensions.AspNetCore/AggregateCommandsTests.MapEnrichedCommand_factory=Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1[Program].verified.txt index ff1590fa..3b41d3fa 100644 --- a/src/Extensions/test/Eventuous.Tests.Extensions.AspNetCore/AggregateCommandsTests.MapEnrichedCommand_factory=Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1[Program].verified.txt +++ b/src/Extensions/test/Eventuous.Tests.Extensions.AspNetCore/AggregateCommandsTests.MapEnrichedCommand_factory=Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1[Program].verified.txt @@ -24,5 +24,5 @@ eventType: V1.RoomBooked } ], - streamPosition: 0 + globalPosition: 0 } \ No newline at end of file diff --git a/src/Extensions/test/Eventuous.Tests.Extensions.AspNetCore/DiscoveredCommandsTests.CallDiscoveredCommandRoute_factory=Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1[Program].verified.txt b/src/Extensions/test/Eventuous.Tests.Extensions.AspNetCore/DiscoveredCommandsTests.CallDiscoveredCommandRoute_factory=Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1[Program].verified.txt index 23b3a78c..c3f21b32 100644 --- a/src/Extensions/test/Eventuous.Tests.Extensions.AspNetCore/DiscoveredCommandsTests.CallDiscoveredCommandRoute_factory=Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1[Program].verified.txt +++ b/src/Extensions/test/Eventuous.Tests.Extensions.AspNetCore/DiscoveredCommandsTests.CallDiscoveredCommandRoute_factory=Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1[Program].verified.txt @@ -24,5 +24,5 @@ eventType: V1.RoomBooked } ], - streamPosition: 0 + globalPosition: 0 } \ No newline at end of file