Skip to content

Commit c760771

Browse files
Fix typos and improve code/documentation clarity
Corrected typos in method names in `PropagationTests.cs` and `SourceTests.cs`. Added `PropagationTests` and `SourceTests` classes. Adjusted XML documentation alignment for `taskCreationOptions` in `Extensions.ReadConcurrently.cs`. Simplified lambda expression in `ReadUntilCancelledAsync` for improved readability.
1 parent f71e708 commit c760771

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

Open.ChannelExtensions.Tests/PropagationTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
namespace Open.ChannelExtensions.Tests;
2+
23
public static class PropagationTests
34
{
45
[Fact]
5-
public static async Task PropagateCompleteionTest()
6+
public static async Task PropagateCompletionTest()
67
{
78
var inputChannel = Channel.CreateBounded<int>(100);
89
var outputChannel = Channel.CreateBounded<int>(100);

Open.ChannelExtensions.Tests/SourceTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
namespace Open.ChannelExtensions.Tests;
2+
23
public static class SourceTests
34
{
45
[Fact]
5-
public static async Task ToChannelCancelledAfterwriteStarts()
6+
public static async Task ToChannelCancelledAfterWriteStarts()
67
{
78
var cts = new CancellationTokenSource();
89
ChannelReader<int> reader = Enumerable.Range(0, 10_000).ToChannel(10, true, cts.Token);

Open.ChannelExtensions/Extensions.ReadConcurrently.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ public static partial class Extensions
88
/// <typeparam name="T">The item type.</typeparam>
99
/// <param name="reader">The channel reader to read from.</param>
1010
/// <param name="maxConcurrency">The maximum number of concurrent operations. Greater than 1 may likely cause results to be out of order.</param>
11-
/// <param name="taskCreationOptions">The task creation options to use.</param>
1211
/// <param name="scheduler">The task scheduler to use.</param>
12+
/// <param name="taskCreationOptions">The task creation options to use.</param>
1313
/// <param name="receiver">The async receiver function.</param>
1414
/// <param name="cancellationToken">The cancellation token.</param>
1515
/// <returns>A task that completes when no more reading is to be done.</returns>
@@ -83,7 +83,7 @@ async Task<long> Read()
8383
{
8484
try
8585
{
86-
return await reader.ReadUntilCancelledAsync(token, (T item, long _) => receiver(item), true).ConfigureAwait(false);
86+
return await reader.ReadUntilCancelledAsync(token, (item, _) => receiver(item), true).ConfigureAwait(false);
8787
}
8888
catch (Exception ex)
8989
{

0 commit comments

Comments
 (0)