-
Notifications
You must be signed in to change notification settings - Fork 37
feat: Add .NET 10 #373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add .NET 10 #373
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| // ReSharper disable once CheckNamespace | ||
| namespace KurrentDB.Client.Tests; | ||
|
|
||
| public static class AsyncEnumerableExtensions { | ||
| public static async Task ForEachAwaitAsync<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, Task> action, CancellationToken cancellationToken = default) { | ||
| await foreach (var element in source.WithCancellation(cancellationToken)) { | ||
| await action(element); | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -209,8 +209,8 @@ public async Task connect_with_retries() { | |||||
| // Act | ||||||
| var subscription = Fixture.Subscriptions.SubscribeToAll(group, userCredentials: TestCredentials.Root); | ||||||
| var retryCount = await subscription.Messages.OfType<PersistentSubscriptionMessage.Event>() | ||||||
| .SelectAwait( | ||||||
| async e => { | ||||||
| .Select( | ||||||
| async (PersistentSubscriptionMessage.Event e, CancellationToken _) => { | ||||||
|
||||||
| async (PersistentSubscriptionMessage.Event e, CancellationToken _) => { | |
| async e => { |
Copilot
AI
Nov 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lambda signature change from async e => to async (PersistentSubscriptionMessage.Event e, CancellationToken ct) => indicates a breaking API change in the async LINQ library. However, since the replacement package System.Linq.AsyncEnumerable at version 10.0.0 does not exist, this change cannot work. You should verify the actual API requirements of the async LINQ library being used.
| async (PersistentSubscriptionMessage.Event e, CancellationToken ct) => { | |
| async e => { |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -338,8 +338,8 @@ await Fixture.Subscriptions.CreateToStreamAsync( | |||||||||
| await using var subscription = Fixture.Subscriptions.SubscribeToStream(stream, group, userCredentials: TestCredentials.Root); | ||||||||||
| await Fixture.Streams.AppendToStreamAsync(stream, StreamState.NoStream, events); | ||||||||||
| var retryCount = await subscription.Messages.OfType<PersistentSubscriptionMessage.Event>() | ||||||||||
| .SelectAwait( | ||||||||||
| async e => { | ||||||||||
| .Select( | ||||||||||
| async (PersistentSubscriptionMessage.Event e, CancellationToken _) => { | ||||||||||
|
Comment on lines
+341
to
+342
|
||||||||||
| .Select( | |
| async (PersistentSubscriptionMessage.Event e, CancellationToken _) => { | |
| .SelectAwait( | |
| async e => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong suggestion, the API conforms to the System.Linq.AsyncEnumerable API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
ForEachAwaitAsyncextension method lacks XML documentation comments. Public extension methods should include XML documentation that describes the method's purpose, parameters, return value, and any exceptions that may be thrown.