Skip to content

Commit 5b48ccf

Browse files
Spelling fixes.
1 parent cf70fdc commit 5b48ccf

7 files changed

Lines changed: 45 additions & 45 deletions

Open.ChannelExtensions/BatchingChannelReader.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ protected BatchingChannelReader(
3939
Timer? _timer;
4040

4141
/// <summary>
42-
/// Specifies a timeout by which a batch will be emmited there is at least one item but has been waiting
42+
/// Specifies a timeout by which a batch will be emitted there is at least one item but has been waiting
4343
/// for longer than the timeout value.
4444
/// </summary>
4545
/// <param name="millisecondsTimeout">
@@ -151,7 +151,7 @@ protected override bool TryPipeItems(bool flush)
151151
{
152152
if (c is null)
153153
{
154-
newBatch = true; // a new batch could start but not be emmited.
154+
newBatch = true; // a new batch could start but not be emitted.
155155
_batch = c = CreateBatch(_batchSize);
156156
AddBatchItem(c, item);
157157
}
@@ -195,7 +195,7 @@ void Emit(ref TBatch? c)
195195
{
196196
_batch = null;
197197
newBatch = false;
198-
if (!batched) TryUpdateTimer(Timeout.Infinite); // Since we're emmitting one, let's ensure the timeout is cancelled.
198+
if (!batched) TryUpdateTimer(Timeout.Infinite); // Since we're emitting one, let's ensure the timeout is cancelled.
199199
batched = Buffer!.Writer.TryWrite(c!);
200200
Debug.Assert(batched);
201201
c = null;

Open.ChannelExtensions/Extensions.Read.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ public static ValueTask<long> ReadAllAsync<T>(this ChannelReader<T> reader,
423423
/// <param name="deferredExecution">If true, calls await Task.Yield() before reading.</param>
424424
/// <returns>The count of items read after the reader has completed.
425425
/// The count should be ignored if the number of iterations could exceed the max value of long.</returns>
426-
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convience.")]
426+
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convenience.")]
427427
public static ValueTask<long> ReadAllAsync<T>(this ChannelReader<T> reader,
428428
CancellationToken cancellationToken,
429429
Func<T, long, ValueTask> receiver,
@@ -480,7 +480,7 @@ public static ValueTask<long> ReadAllAsync<TWrite, TRead>(this Channel<TWrite, T
480480
/// <param name="deferredExecution">If true, calls await Task.Yield() before reading.</param>
481481
/// <returns>The count of items read after the reader has completed.
482482
/// The count should be ignored if the number of iterations could exceed the max value of long.</returns>
483-
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convience.")]
483+
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convenience.")]
484484
public static ValueTask<long> ReadAllAsync<TWrite, TRead>(this Channel<TWrite, TRead> channel,
485485
CancellationToken cancellationToken,
486486
Func<TRead, long, ValueTask> receiver,
@@ -532,7 +532,7 @@ public static ValueTask<long> TaskReadAllAsync<TWrite, TRead>(this Channel<TWrit
532532
/// <param name="deferredExecution">If true, calls await Task.Yield() before reading.</param>
533533
/// <returns>The count of items read after the reader has completed.
534534
/// The count should be ignored if the number of iterations could exceed the max value of long.</returns>
535-
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convience.")]
535+
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convenience.")]
536536
public static ValueTask<long> TaskReadAllAsync<TWrite, TRead>(this Channel<TWrite, TRead> channel,
537537
CancellationToken cancellationToken,
538538
Func<TRead, long, Task> receiver,
@@ -581,7 +581,7 @@ public static ValueTask<long> ReadAllAsync<T>(this ChannelReader<T> reader,
581581
/// <param name="deferredExecution">If true, calls await Task.Yield() before reading.</param>
582582
/// <returns>The count of items read after the reader has completed.
583583
/// The count should be ignored if the number of iterations could exceed the max value of long.</returns>
584-
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convience.")]
584+
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convenience.")]
585585
public static ValueTask<long> ReadAllAsync<T>(this ChannelReader<T> reader,
586586
CancellationToken cancellationToken,
587587
Func<T, ValueTask> receiver,
@@ -630,7 +630,7 @@ public static ValueTask<long> TaskReadAllAsync<T>(this ChannelReader<T> reader,
630630
/// <param name="deferredExecution">If true, calls await Task.Yield() before reading.</param>
631631
/// <returns>The count of items read after the reader has completed.
632632
/// The count should be ignored if the number of iterations could exceed the max value of long.</returns>
633-
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convience.")]
633+
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convenience.")]
634634
public static ValueTask<long> TaskReadAllAsync<T>(this ChannelReader<T> reader,
635635
CancellationToken cancellationToken,
636636
Func<T, Task> receiver,
@@ -682,7 +682,7 @@ public static ValueTask<long> TaskReadAllAsync<TWrite, TRead>(this Channel<TWrit
682682
/// <param name="deferredExecution">If true, calls await Task.Yield() before reading.</param>
683683
/// <returns>The count of items read after the reader has completed.
684684
/// The count should be ignored if the number of iterations could exceed the max value of long.</returns>
685-
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convience.")]
685+
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convenience.")]
686686
public static ValueTask<long> TaskReadAllAsync<TWrite, TRead>(this Channel<TWrite, TRead> channel,
687687
CancellationToken cancellationToken,
688688
Func<TRead, Task> receiver,
@@ -740,7 +740,7 @@ public static ValueTask<long> ReadAllAsync<TWrite, TRead>(this Channel<TWrite, T
740740
/// <param name="deferredExecution">If true, calls await Task.Yield() before reading.</param>
741741
/// <returns>The count of items read after the reader has completed.
742742
/// The count should be ignored if the number of iterations could exceed the max value of long.</returns>
743-
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convience.")]
743+
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convenience.")]
744744
public static ValueTask<long> ReadAllAsync<TWrite, TRead>(this Channel<TWrite, TRead> channel,
745745
CancellationToken cancellationToken,
746746
Func<TRead, ValueTask> receiver,
@@ -753,7 +753,7 @@ public static ValueTask<long> ReadAllAsync<TWrite, TRead>(this Channel<TWrite, T
753753
/// <typeparam name="T">The item type.</typeparam>
754754
/// <param name="reader">The channel reader to read from.</param>
755755
/// <param name="receiver">The receiver function.</param>
756-
/// <param name="deferredExecution">If true, calls await Task.Yield() before writreadinging.</param>
756+
/// <param name="deferredExecution">If true, calls await Task.Yield() before reading.</param>
757757
/// <param name="cancellationToken">An optional cancellation token.</param>
758758
/// <returns>The count of items read after the reader has completed.
759759
/// The count should be ignored if the number of iterations could exceed the max value of long.</returns>
@@ -783,7 +783,7 @@ public static ValueTask<long> ReadAll<T>(this ChannelReader<T> reader,
783783
/// <param name="reader">The channel reader to read from.</param>
784784
/// <param name="receiver">The receiver function.</param>
785785
/// <param name="cancellationToken">The cancellation token.</param>
786-
/// <param name="deferredExecution">If true, calls await Task.Yield() before writreadinging.</param>
786+
/// <param name="deferredExecution">If true, calls await Task.Yield() before reading.</param>
787787
/// <returns>The count of items read after the reader has completed.
788788
/// The count should be ignored if the number of iterations could exceed the max value of long.</returns>
789789
public static ValueTask<long> ReadAll<T>(this ChannelReader<T> reader,
@@ -799,10 +799,10 @@ public static ValueTask<long> ReadAll<T>(this ChannelReader<T> reader,
799799
/// <param name="reader">The channel reader to read from.</param>
800800
/// <param name="cancellationToken">The cancellation token.</param>
801801
/// <param name="receiver">The receiver function.</param>
802-
/// <param name="deferredExecution">If true, calls await Task.Yield() before writreadinging.</param>
802+
/// <param name="deferredExecution">If true, calls await Task.Yield() before reading.</param>
803803
/// <returns>The count of items read after the reader has completed.
804804
/// The count should be ignored if the number of iterations could exceed the max value of long.</returns>
805-
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convience.")]
805+
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convenience.")]
806806
public static ValueTask<long> ReadAll<T>(this ChannelReader<T> reader,
807807
CancellationToken cancellationToken,
808808
Action<T, long> receiver,
@@ -860,7 +860,7 @@ public static ValueTask<long> ReadAll<TWrite, TRead>(this Channel<TWrite, TRead>
860860
/// <param name="deferredExecution">If true, calls await Task.Yield() before reading.</param>
861861
/// <returns>The count of items read after the reader has completed.
862862
/// The count should be ignored if the number of iterations could exceed the max value of long.</returns>
863-
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convience.")]
863+
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convenience.")]
864864
public static ValueTask<long> ReadAll<TWrite, TRead>(this Channel<TWrite, TRead> channel,
865865
CancellationToken cancellationToken,
866866
Action<TRead, long> receiver,
@@ -921,7 +921,7 @@ public static ValueTask<long> ReadAll<T>(this ChannelReader<T> reader,
921921
/// <param name="deferredExecution">If true, calls await Task.Yield() before reading.</param>
922922
/// <returns>The count of items read after the reader has completed.
923923
/// The count should be ignored if the number of iterations could exceed the max value of long.</returns>
924-
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convience.")]
924+
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convenience.")]
925925
public static ValueTask<long> ReadAll<T>(this ChannelReader<T> reader,
926926
CancellationToken cancellationToken,
927927
Action<T> receiver,
@@ -978,7 +978,7 @@ public static ValueTask<long> ReadAll<TWrite, TRead>(this Channel<TWrite, TRead>
978978
/// <param name="deferredExecution">If true, calls await Task.Yield() before reading.</param>
979979
/// <returns>The count of items read after the reader has completed.
980980
/// The count should be ignored if the number of iterations could exceed the max value of long.</returns>
981-
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convience.")]
981+
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convenience.")]
982982
public static ValueTask<long> ReadAll<TWrite, TRead>(this Channel<TWrite, TRead> channel,
983983
CancellationToken cancellationToken,
984984
Action<TRead> receiver,
@@ -1020,7 +1020,7 @@ public static ValueTask<long> ReadAllAsLines(this ChannelReader<string> reader,
10201020
/// </summary>
10211021
/// <typeparam name="T">The item type.</typeparam>
10221022
/// <param name="channel">The channel to read from.</param>
1023-
/// <param name="receiver">The TextWriter to recieve the lines.</param>
1023+
/// <param name="receiver">The TextWriter to receive the lines.</param>
10241024
/// <param name="deferredExecution">If true, calls await Task.Yield() before reading.</param>
10251025
/// <param name="cancellationToken">An optional cancellation token.</param>
10261026
/// <returns>The count of items read after the reader has completed.
@@ -1041,7 +1041,7 @@ public static ValueTask<long> ReadAllAsLines<T>(this Channel<T, string> channel,
10411041
/// </summary>
10421042
/// <typeparam name="T">The item type.</typeparam>
10431043
/// <param name="channel">The channel to read from.</param>
1044-
/// <param name="receiver">The TextWriter to recieve the lines.</param>
1044+
/// <param name="receiver">The TextWriter to receive the lines.</param>
10451045
/// <param name="cancellationToken">An optional cancellation token.</param>
10461046
/// <param name="deferredExecution">If true, calls await Task.Yield() before reading.</param>
10471047
/// <returns>The count of items read after the reader has completed.

Open.ChannelExtensions/Extensions.ReadConcurrently.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ async Task<long> Read()
7979
/// <param name="cancellationToken">The cancellation token.</param>
8080
/// <param name="receiver">The async receiver function.</param>
8181
/// <returns>A task that completes when no more reading is to be done.</returns>
82-
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convience.")]
82+
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convenience.")]
8383
public static Task<long> ReadAllConcurrentlyAsync<T>(this ChannelReader<T> reader,
8484
int maxConcurrency,
8585
CancellationToken cancellationToken,
@@ -132,7 +132,7 @@ public static Task<long> ReadAllConcurrentlyAsync<TWrite, TRead>(this Channel<TW
132132
/// <param name="cancellationToken">The cancellation token.</param>
133133
/// <param name="receiver">The async receiver function.</param>
134134
/// <returns>A task that completes when no more reading is to be done.</returns>
135-
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convience.")]
135+
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convenience.")]
136136
public static Task<long> ReadAllConcurrentlyAsync<TWrite, TRead>(this Channel<TWrite, TRead> channel,
137137
int maxConcurrency,
138138
CancellationToken cancellationToken,
@@ -190,7 +190,7 @@ public static Task<long> ReadAllConcurrently<T>(this ChannelReader<T> reader,
190190
/// <param name="cancellationToken">The cancellation token.</param>
191191
/// <param name="receiver">The receiver function.</param>
192192
/// <returns>A task that completes when no more reading is to be done.</returns>
193-
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convience.")]
193+
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convenience.")]
194194
public static Task<long> ReadAllConcurrently<T>(this ChannelReader<T> reader,
195195
int maxConcurrency,
196196
CancellationToken cancellationToken,
@@ -228,7 +228,7 @@ public static Task<long> ReadAllConcurrently<TWrite, TRead>(this Channel<TWrite,
228228
/// <param name="cancellationToken">The cancellation token.</param>
229229
/// <param name="receiver">The receiver function.</param>
230230
/// <returns>A task that completes when no more reading is to be done.</returns>
231-
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convience.")]
231+
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convenience.")]
232232
public static Task<long> ReadAllConcurrently<TWrite, TRead>(this Channel<TWrite, TRead> channel,
233233
int maxConcurrency,
234234
CancellationToken cancellationToken,
@@ -300,7 +300,7 @@ async Task Read()
300300
}
301301

302302
/// <inheritdoc cref="ReadAllAsEnumerablesAsync{T}(ChannelReader{T}, Func{IEnumerable{T}, ValueTask}, bool, CancellationToken)"/>
303-
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convience.")]
303+
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convenience.")]
304304
public static Task ReadAllConcurrentlyAsEnumerablesAsync<T>(this ChannelReader<T> reader,
305305
int maxConcurrency,
306306
CancellationToken cancellationToken,
@@ -327,7 +327,7 @@ public static Task ReadAllConcurrentlyAsEnumerables<T>(this ChannelReader<T> rea
327327
}
328328

329329
/// <inheritdoc cref="ReadAllAsEnumerablesAsync{T}(ChannelReader{T}, Func{IEnumerable{T}, ValueTask}, bool, CancellationToken)"/>
330-
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convience.")]
330+
[SuppressMessage("Design", "CA1068:CancellationToken parameters must come last", Justification = "Provided for aesthetic convenience.")]
331331
public static Task ReadAllConcurrentlyAsEnumerables<T>(this ChannelReader<T> reader,
332332
int maxConcurrency,
333333
CancellationToken cancellationToken,

Open.ChannelExtensions/Extensions.Transform.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public override ValueTask<bool> WaitToReadAsync(CancellationToken cancellationTo
4141
/// <typeparam name="TResult">The output type of the transform.</typeparam>
4242
/// <param name="source">The source channel reader.</param>
4343
/// <param name="transform">The transform function.</param>
44-
/// <returns>A channel reader representing the tranformed results.</returns>
44+
/// <returns>A channel reader representing the transformed results.</returns>
4545
public static ChannelReader<TResult> Transform<T, TResult>(this ChannelReader<T> source, Func<T, TResult> transform)
4646
=> new TransformingChannelReader<T, TResult>(source, transform);
4747

@@ -53,7 +53,7 @@ public static ChannelReader<TResult> Transform<T, TResult>(this ChannelReader<T>
5353
/// <typeparam name="TResult">Specifies the type of data that may be read from the channel.</typeparam>
5454
/// <param name="source">The source channel reader.</param>
5555
/// <param name="transform">The transform function.</param>
56-
/// <returns>A channel reader representing the tranformed results.</returns>
56+
/// <returns>A channel reader representing the transformed results.</returns>
5757
public static TransformChannel<TWrite, TRead, TResult> Transform<TWrite, TRead, TResult>(this Channel<TWrite, TRead> source, Func<TRead, TResult> transform)
5858
=> new(source, transform);
5959

@@ -64,7 +64,7 @@ public static TransformChannel<TWrite, TRead, TResult> Transform<TWrite, TRead,
6464
/// <typeparam name="TResult">Specifies the type of data that may be read from the channel.</typeparam>
6565
/// <param name="source">The source channel reader.</param>
6666
/// <param name="transform">The transform function.</param>
67-
/// <returns>A channel reader representing the tranformed results.</returns>
67+
/// <returns>A channel reader representing the transformed results.</returns>
6868
public static TransformChannel<T, TResult> Transform<T, TResult>(this Channel<T> source, Func<T, TResult> transform)
6969
=> new(source, transform);
7070
}

0 commit comments

Comments
 (0)