Closed kamisoft-fr closed 7 months ago
Hi guys,
I have a problem upgrading from 6.x to 8.x, it appears that ToChannel extension is not visible anymore for IAsyncEnumerable<>
I downloaded the project and added a test method as I remarked that the test project is targeting .NET 8 to see whether the code would build or not
[Theory] [InlineData(testSize1)] [InlineData(testSize2)] [SuppressMessage("Reliability", "CA2012:Use ValueTasks correctly", Justification = "Testing only.")] [SuppressMessage("CodeQuality", "IDE0079:Remove unnecessary suppression", Justification = "<Pending>")] public static async Task ToChannelTest(int testSize) { var range = CreateAsyncEnumerableRange(testSize); var result = new List<int>(testSize); var startedAt = TimeProvider.System.GetTimestamp(); ChannelReader<int> reader = range .ToChannel(singleReader: true, deferredExecution: true); _ = reader.ReadAll(i => result.Add(i), true); await reader.Completion; var elapsed = TimeProvider.System.GetElapsedTime(startedAt); } static async IAsyncEnumerable<int> CreateAsyncEnumerableRange(int testSize) { foreach (var i in Enumerable.Range(0, testSize)) yield return i; await Task.CompletedTask; }
On it.
v6, v7, and v8 all updated. (nuget) Please check and see if that fixes it. (it should).
I confirm it's compiling now, thanks mate 👌
Hi guys,
I have a problem upgrading from 6.x to 8.x, it appears that ToChannel extension is not visible anymore for IAsyncEnumerable<>
I downloaded the project and added a test method as I remarked that the test project is targeting .NET 8 to see whether the code would build or not
Result : I observe the same behavior, the following code does not build
Here is the code I added to BasicTests.cs