@@ -11,7 +11,7 @@ public static partial class AsyncSuperEnumerable
11
11
/// <param name="separator">Separator element.</param>
12
12
/// <returns>A sequence of splits of elements.</returns>
13
13
/// <exception cref="ArgumentNullException"><paramref name="source"/> is <see langword="null"/>.</exception>
14
- public static IAsyncEnumerable < IEnumerable < TSource > > Split < TSource > (
14
+ public static IAsyncEnumerable < IReadOnlyList < TSource > > Split < TSource > (
15
15
this IAsyncEnumerable < TSource > source ,
16
16
TSource separator )
17
17
{
@@ -28,7 +28,7 @@ public static IAsyncEnumerable<IEnumerable<TSource>> Split<TSource>(
28
28
/// <returns>A sequence of splits of elements.</returns>
29
29
/// <exception cref="ArgumentNullException"><paramref name="source"/> is <see langword="null"/>.</exception>
30
30
/// <exception cref="ArgumentOutOfRangeException"><paramref name="count"/> is less than 1.</exception>
31
- public static IAsyncEnumerable < IEnumerable < TSource > > Split < TSource > (
31
+ public static IAsyncEnumerable < IReadOnlyList < TSource > > Split < TSource > (
32
32
this IAsyncEnumerable < TSource > source ,
33
33
TSource separator , int count )
34
34
{
@@ -53,7 +53,7 @@ public static IAsyncEnumerable<IEnumerable<TSource>> Split<TSource>(
53
53
public static IAsyncEnumerable < TResult > Split < TSource , TResult > (
54
54
this IAsyncEnumerable < TSource > source ,
55
55
TSource separator ,
56
- Func < IEnumerable < TSource > , TResult > resultSelector )
56
+ Func < IReadOnlyList < TSource > , TResult > resultSelector )
57
57
{
58
58
return Split ( source , separator , int . MaxValue , resultSelector ) ;
59
59
}
@@ -78,7 +78,7 @@ public static IAsyncEnumerable<TResult> Split<TSource, TResult>(
78
78
public static IAsyncEnumerable < TResult > Split < TSource , TResult > (
79
79
this IAsyncEnumerable < TSource > source ,
80
80
TSource separator , int count ,
81
- Func < IEnumerable < TSource > , TResult > resultSelector )
81
+ Func < IReadOnlyList < TSource > , TResult > resultSelector )
82
82
{
83
83
return Split ( source , separator , null , count , resultSelector ) ;
84
84
}
@@ -94,7 +94,7 @@ public static IAsyncEnumerable<TResult> Split<TSource, TResult>(
94
94
/// element equality.</param>
95
95
/// <returns>A sequence of splits of elements.</returns>
96
96
/// <exception cref="ArgumentNullException"><paramref name="source"/> is <see langword="null"/>.</exception>
97
- public static IAsyncEnumerable < IEnumerable < TSource > > Split < TSource > (
97
+ public static IAsyncEnumerable < IReadOnlyList < TSource > > Split < TSource > (
98
98
this IAsyncEnumerable < TSource > source ,
99
99
TSource separator , IEqualityComparer < TSource > ? comparer )
100
100
{
@@ -115,7 +115,7 @@ public static IAsyncEnumerable<IEnumerable<TSource>> Split<TSource>(
115
115
/// <returns>A sequence of splits of elements.</returns>
116
116
/// <exception cref="ArgumentNullException"><paramref name="source"/> is <see langword="null"/>.</exception>
117
117
/// <exception cref="ArgumentOutOfRangeException"><paramref name="count"/> is less than 1.</exception>
118
- public static IAsyncEnumerable < IEnumerable < TSource > > Split < TSource > (
118
+ public static IAsyncEnumerable < IReadOnlyList < TSource > > Split < TSource > (
119
119
this IAsyncEnumerable < TSource > source ,
120
120
TSource separator , IEqualityComparer < TSource > ? comparer , int count )
121
121
{
@@ -143,7 +143,7 @@ public static IAsyncEnumerable<IEnumerable<TSource>> Split<TSource>(
143
143
public static IAsyncEnumerable < TResult > Split < TSource , TResult > (
144
144
this IAsyncEnumerable < TSource > source ,
145
145
TSource separator , IEqualityComparer < TSource > comparer ,
146
- Func < IEnumerable < TSource > , TResult > resultSelector )
146
+ Func < IReadOnlyList < TSource > , TResult > resultSelector )
147
147
{
148
148
return Split ( source , separator , comparer , int . MaxValue , resultSelector ) ;
149
149
}
@@ -171,7 +171,7 @@ public static IAsyncEnumerable<TResult> Split<TSource, TResult>(
171
171
public static IAsyncEnumerable < TResult > Split < TSource , TResult > (
172
172
this IAsyncEnumerable < TSource > source ,
173
173
TSource separator , IEqualityComparer < TSource > ? comparer , int count ,
174
- Func < IEnumerable < TSource > , TResult > resultSelector )
174
+ Func < IReadOnlyList < TSource > , TResult > resultSelector )
175
175
{
176
176
ArgumentNullException . ThrowIfNull ( source ) ;
177
177
ArgumentOutOfRangeException . ThrowIfNegativeOrZero ( count ) ;
@@ -192,7 +192,7 @@ public static IAsyncEnumerable<TResult> Split<TSource, TResult>(
192
192
/// <returns>A sequence of splits of elements.</returns>
193
193
/// <exception cref="ArgumentNullException"><paramref name="source"/> is <see langword="null"/>.</exception>
194
194
/// <exception cref="ArgumentNullException"><paramref name="separatorFunc"/> is <see langword="null"/>.</exception>
195
- public static IAsyncEnumerable < IEnumerable < TSource > > Split < TSource > (
195
+ public static IAsyncEnumerable < IReadOnlyList < TSource > > Split < TSource > (
196
196
this IAsyncEnumerable < TSource > source ,
197
197
Func < TSource , bool > separatorFunc )
198
198
{
@@ -212,7 +212,7 @@ public static IAsyncEnumerable<IEnumerable<TSource>> Split<TSource>(
212
212
/// <exception cref="ArgumentNullException"><paramref name="source"/> is <see langword="null"/>.</exception>
213
213
/// <exception cref="ArgumentNullException"><paramref name="separatorFunc"/> is <see langword="null"/>.</exception>
214
214
/// <exception cref="ArgumentOutOfRangeException"><paramref name="count"/> is less than 1.</exception>
215
- public static IAsyncEnumerable < IEnumerable < TSource > > Split < TSource > (
215
+ public static IAsyncEnumerable < IReadOnlyList < TSource > > Split < TSource > (
216
216
this IAsyncEnumerable < TSource > source ,
217
217
Func < TSource , bool > separatorFunc , int count )
218
218
{
@@ -239,7 +239,7 @@ public static IAsyncEnumerable<IEnumerable<TSource>> Split<TSource>(
239
239
public static IAsyncEnumerable < TResult > Split < TSource , TResult > (
240
240
this IAsyncEnumerable < TSource > source ,
241
241
Func < TSource , bool > separatorFunc ,
242
- Func < IEnumerable < TSource > , TResult > resultSelector )
242
+ Func < IReadOnlyList < TSource > , TResult > resultSelector )
243
243
{
244
244
return Split ( source , separatorFunc , int . MaxValue , resultSelector ) ;
245
245
}
@@ -267,7 +267,7 @@ public static IAsyncEnumerable<TResult> Split<TSource, TResult>(
267
267
public static IAsyncEnumerable < TResult > Split < TSource , TResult > (
268
268
this IAsyncEnumerable < TSource > source ,
269
269
Func < TSource , bool > separatorFunc , int count ,
270
- Func < IEnumerable < TSource > , TResult > resultSelector )
270
+ Func < IReadOnlyList < TSource > , TResult > resultSelector )
271
271
{
272
272
ArgumentNullException . ThrowIfNull ( source ) ;
273
273
ArgumentNullException . ThrowIfNull ( separatorFunc ) ;
@@ -279,7 +279,7 @@ public static IAsyncEnumerable<TResult> Split<TSource, TResult>(
279
279
static async IAsyncEnumerable < TResult > Core (
280
280
IAsyncEnumerable < TSource > source ,
281
281
Func < TSource , bool > separatorFunc , int count ,
282
- Func < IEnumerable < TSource > , TResult > resultSelector ,
282
+ Func < IReadOnlyList < TSource > , TResult > resultSelector ,
283
283
[ EnumeratorCancellation ] CancellationToken cancellationToken = default )
284
284
{
285
285
var items = new List < TSource > ( ) ;
0 commit comments