Skip to content

Commit

Permalink
It is global position in FromSucess. (#386)
Browse files Browse the repository at this point in the history
* It is global position in FromSucess.

* update verified files
  • Loading branch information
Lejdholt authored Dec 2, 2024
1 parent 6a75bd5 commit 9624478
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions src/Core/src/Eventuous.Application/Result.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ public bool TryGetError([NotNullWhen(true)] out Error? error) {
/// </summary>
/// <param name="state">State instance</param>
/// <param name="changes">List of new events</param>
/// <param name="streamPosition">Position of the last new event in the log</param>
/// <param name="globalPosition">Global position of the last new event in the log</param>
/// <returns>New result instance</returns>
public static Result<TState> FromSuccess(TState state, IEnumerable<Change> changes, ulong streamPosition)
=> new() { _value = new(state, changes, streamPosition) };
public static Result<TState> FromSuccess(TState state, IEnumerable<Change> changes, ulong globalPosition)
=> new() { _value = new(state, changes, globalPosition) };

/// <summary>
/// Creates a result instance from an error
Expand Down Expand Up @@ -151,8 +151,8 @@ public async Task MatchAsync(Func<Ok, Task> matchOk, Func<Error, Task> matchErro
/// </summary>
/// <param name="State">New state instance</param>
/// <param name="Changes">Collection of new events</param>
/// <param name="StreamPosition">Position of the last new event in the log</param>
public record Ok(TState State, IEnumerable<Change> Changes, ulong StreamPosition);
/// <param name="GlobalPosition">Global position of the last new event in the log</param>
public record Ok(TState State, IEnumerable<Change> Changes, ulong GlobalPosition);

/// <summary>
/// State of an error result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
eventType: V1.BookingImported
}
],
streamPosition: 0
globalPosition: 0
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
eventType: V1.BookingImported
}
],
streamPosition: 0
globalPosition: 0
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
eventType: V1.BookingImported
}
],
streamPosition: 0
globalPosition: 0
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
eventType: V1.RoomBooked
}
],
streamPosition: 0
globalPosition: 0
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
eventType: V1.RoomBooked
}
],
streamPosition: 0
globalPosition: 0
}

0 comments on commit 9624478

Please sign in to comment.