Skip to content

Commit e9d1899

Browse files
Disable Index/Range APIs
1 parent 0aba083 commit e9d1899

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+487
-400
lines changed

Source/SuperLinq.Async/ElementAt.cs

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4+
#if !NO_INDEX
5+
46
namespace SuperLinq.Async;
57

68
public static partial class AsyncSuperEnumerable
@@ -19,11 +21,7 @@ public static partial class AsyncSuperEnumerable
1921
/// To instead return a default value when the specified index is out of range,
2022
/// use the <see cref="ElementAtOrDefaultAsync{TSource}(IAsyncEnumerable{TSource}, Index, CancellationToken)" /> method.</para>
2123
/// </remarks>
22-
#if NETCOREAPP
2324
public static ValueTask<TSource> ElementAtAsync<TSource>(
24-
#else
25-
internal static ValueTask<TSource> ElementAtAsync<TSource>(
26-
#endif
2725
this IAsyncEnumerable<TSource> source,
2826
Index index,
2927
CancellationToken cancellationToken = default
@@ -56,11 +54,7 @@ static async ValueTask<TSource> Core(IAsyncEnumerable<TSource> source, Index ind
5654
/// <remarks>
5755
/// <para>The default value for reference and nullable types is <see langword="null" />.</para>
5856
/// </remarks>
59-
#if NETCOREAPP
6057
public static ValueTask<TSource?> ElementAtOrDefaultAsync<TSource>(
61-
#else
62-
internal static ValueTask<TSource?> ElementAtOrDefaultAsync<TSource>(
63-
#endif
6458
this IAsyncEnumerable<TSource> source,
6559
Index index,
6660
CancellationToken cancellationToken = default
@@ -109,3 +103,5 @@ CancellationToken cancellationToken
109103
return (false, default);
110104
}
111105
}
106+
107+
#endif

Source/SuperLinq.Async/FindIndex.cs

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#if !NO_INDEX
2+
13
namespace SuperLinq.Async;
24

35
public static partial class AsyncSuperEnumerable
@@ -74,11 +76,7 @@ public static ValueTask<int> FindIndex<TSource>(
7476
/// This operator executes immediately.
7577
/// </para>
7678
/// </remarks>
77-
#if NETCOREAPP
7879
public static ValueTask<int> FindIndex<TSource>(
79-
#else
80-
internal static ValueTask<int> FindIndex<TSource>(
81-
#endif
8280
this IAsyncEnumerable<TSource> source,
8381
Func<TSource, bool> predicate,
8482
Index index,
@@ -124,11 +122,7 @@ internal static ValueTask<int> FindIndex<TSource>(
124122
/// This operator executes immediately.
125123
/// </para>
126124
/// </remarks>
127-
#if NETCOREAPP
128125
public static ValueTask<int> FindIndex<TSource>(
129-
#else
130-
internal static ValueTask<int> FindIndex<TSource>(
131-
#endif
132126
this IAsyncEnumerable<TSource> source,
133127
Func<TSource, bool> predicate,
134128
Index index,
@@ -210,3 +204,5 @@ CancellationToken cancellationToken
210204
}
211205
}
212206
}
207+
208+
#endif

Source/SuperLinq.Async/FindLastIndex.cs

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#if !NO_INDEX
2+
13
namespace SuperLinq.Async;
24

35
public static partial class AsyncSuperEnumerable
@@ -76,11 +78,7 @@ public static ValueTask<int> FindLastIndex<TSource>(
7678
/// This operator executes immediately.
7779
/// </para>
7880
/// </remarks>
79-
#if NETCOREAPP
8081
public static ValueTask<int> FindLastIndex<TSource>(
81-
#else
82-
internal static ValueTask<int> FindLastIndex<TSource>(
83-
#endif
8482
this IAsyncEnumerable<TSource> source,
8583
Func<TSource, bool> predicate,
8684
Index index,
@@ -128,11 +126,7 @@ internal static ValueTask<int> FindLastIndex<TSource>(
128126
/// This operator executes immediately.
129127
/// </para>
130128
/// </remarks>
131-
#if NETCOREAPP
132129
public static ValueTask<int> FindLastIndex<TSource>(
133-
#else
134-
internal static ValueTask<int> FindLastIndex<TSource>(
135-
#endif
136130
this IAsyncEnumerable<TSource> source,
137131
Func<TSource, bool> predicate,
138132
Index index,
@@ -195,3 +189,5 @@ CancellationToken cancellationToken
195189
}
196190
}
197191
}
192+
193+
#endif

Source/SuperLinq.Async/IAsyncBuffer.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace SuperLinq.Async;
1+
namespace SuperLinq.Async;
22

33
/// <summary>
44
/// Represents a cached sequence that can be re-enumerated multiple times.
@@ -20,7 +20,7 @@ public interface IAsyncBuffer<out T> : IAsyncEnumerable<T>, IAsyncDisposable
2020
/// </summary>
2121
int Count { get; }
2222

23-
#if !NETSTANDARD
23+
#if NETCOREAPP
2424
/// <summary>
2525
/// Configures how awaits on the tasks returned from an async disposable are performed.
2626
/// </summary>

Source/SuperLinq.Async/IndexOf.cs

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#if !NO_INDEX
2+
13
namespace SuperLinq.Async;
24

35
public static partial class AsyncSuperEnumerable
@@ -71,11 +73,7 @@ public static ValueTask<int> IndexOf<TSource>(
7173
/// This operator executes immediately.
7274
/// </para>
7375
/// </remarks>
74-
#if NETCOREAPP
7576
public static ValueTask<int> IndexOf<TSource>(
76-
#else
77-
internal static ValueTask<int> IndexOf<TSource>(
78-
#endif
7977
this IAsyncEnumerable<TSource> source,
8078
TSource item,
8179
Index index,
@@ -119,11 +117,7 @@ internal static ValueTask<int> IndexOf<TSource>(
119117
/// This operator executes immediately.
120118
/// </para>
121119
/// </remarks>
122-
#if NETCOREAPP
123120
public static ValueTask<int> IndexOf<TSource>(
124-
#else
125-
internal static ValueTask<int> IndexOf<TSource>(
126-
#endif
127121
this IAsyncEnumerable<TSource> source,
128122
TSource item,
129123
Index index,
@@ -134,3 +128,5 @@ internal static ValueTask<int> IndexOf<TSource>(
134128
return FindIndex(source, i => EqualityComparer<TSource>.Default.Equals(i, item), index, count, cancellationToken);
135129
}
136130
}
131+
132+
#endif

Source/SuperLinq.Async/Insert.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#if !NO_INDEX
2+
13
namespace SuperLinq.Async;
24

35
public static partial class AsyncSuperEnumerable
@@ -91,11 +93,7 @@ static async IAsyncEnumerable<T> Core(
9193
/// yielding the next element after having iterated
9294
/// <paramref name="first"/> entirely.
9395
/// </exception>
94-
#if NETCOREAPP
9596
public static IAsyncEnumerable<T> Insert<T>(this IAsyncEnumerable<T> first, IAsyncEnumerable<T> second, Index index)
96-
#else
97-
internal static IAsyncEnumerable<T> Insert<T>(this IAsyncEnumerable<T> first, IAsyncEnumerable<T> second, Index index)
98-
#endif
9997
{
10098
ArgumentNullException.ThrowIfNull(first);
10199
ArgumentNullException.ThrowIfNull(second);
@@ -140,3 +138,5 @@ static async IAsyncEnumerable<T> Core(
140138
}
141139
}
142140
}
141+
142+
#endif

Source/SuperLinq.Async/LastIndexOf.cs

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#if !NO_INDEX
2+
13
namespace SuperLinq.Async;
24

35
public static partial class AsyncSuperEnumerable
@@ -73,11 +75,7 @@ public static ValueTask<int> LastIndexOf<TSource>(
7375
/// This operator executes immediately.
7476
/// </para>
7577
/// </remarks>
76-
#if NETCOREAPP
7778
public static ValueTask<int> LastIndexOf<TSource>(
78-
#else
79-
internal static ValueTask<int> LastIndexOf<TSource>(
80-
#endif
8179
this IAsyncEnumerable<TSource> source,
8280
TSource item,
8381
Index index,
@@ -122,11 +120,7 @@ internal static ValueTask<int> LastIndexOf<TSource>(
122120
/// This operator executes immediately.
123121
/// </para>
124122
/// </remarks>
125-
#if NETCOREAPP
126123
public static ValueTask<int> LastIndexOf<TSource>(
127-
#else
128-
internal static ValueTask<int> LastIndexOf<TSource>(
129-
#endif
130124
this IAsyncEnumerable<TSource> source,
131125
TSource item,
132126
Index index,
@@ -143,3 +137,5 @@ internal static ValueTask<int> LastIndexOf<TSource>(
143137
);
144138
}
145139
}
140+
141+
#endif

Source/SuperLinq.Async/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
static SuperLinq.Async.AsyncSuperEnumerable.AggregateBy<TSource, TKey, TAccumulate>(this System.Collections.Generic.IAsyncEnumerable<TSource>! source, System.Func<TSource, TKey>! keySelector, System.Func<TKey, TAccumulate>! seedSelector, System.Func<TAccumulate, TSource, TAccumulate>! func, System.Collections.Generic.IEqualityComparer<TKey>? comparer = null) -> System.Collections.Generic.IAsyncEnumerable<System.Collections.Generic.KeyValuePair<TKey, TAccumulate>>!
1+
static SuperLinq.Async.AsyncSuperEnumerable.AggregateBy<TSource, TKey, TAccumulate>(this System.Collections.Generic.IAsyncEnumerable<TSource>! source, System.Func<TSource, TKey>! keySelector, System.Func<TKey, TAccumulate>! seedSelector, System.Func<TAccumulate, TSource, TAccumulate>! func, System.Collections.Generic.IEqualityComparer<TKey>? comparer = null) -> System.Collections.Generic.IAsyncEnumerable<System.Collections.Generic.KeyValuePair<TKey, TAccumulate>>!
22
static SuperLinq.Async.AsyncSuperEnumerable.AggregateBy<TSource, TKey, TAccumulate>(this System.Collections.Generic.IAsyncEnumerable<TSource>! source, System.Func<TSource, TKey>! keySelector, TAccumulate seed, System.Func<TAccumulate, TSource, TAccumulate>! func, System.Collections.Generic.IEqualityComparer<TKey>? comparer = null) -> System.Collections.Generic.IAsyncEnumerable<System.Collections.Generic.KeyValuePair<TKey, TAccumulate>>!
33
static SuperLinq.Async.AsyncSuperEnumerable.AggregateRight<TSource, TAccumulate, TResult>(this System.Collections.Generic.IAsyncEnumerable<TSource>! source, TAccumulate seed, System.Func<TSource, TAccumulate, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<TAccumulate>>! func, System.Func<TAccumulate, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<TResult>>! resultSelector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask<TResult>
44
static SuperLinq.Async.AsyncSuperEnumerable.AggregateRight<TSource, TAccumulate, TResult>(this System.Collections.Generic.IAsyncEnumerable<TSource>! source, TAccumulate seed, System.Func<TSource, TAccumulate, System.Threading.Tasks.ValueTask<TAccumulate>>! func, System.Func<TAccumulate, System.Threading.Tasks.ValueTask<TResult>>! resultSelector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask<TResult>
@@ -114,8 +114,6 @@ static SuperLinq.Async.AsyncSuperEnumerable.FillForward<T>(this System.Collectio
114114
static SuperLinq.Async.AsyncSuperEnumerable.FillForward<T>(this System.Collections.Generic.IAsyncEnumerable<T>! source, System.Func<T, System.Threading.Tasks.ValueTask<bool>>! predicate) -> System.Collections.Generic.IAsyncEnumerable<T>!
115115
static SuperLinq.Async.AsyncSuperEnumerable.FillForward<T>(this System.Collections.Generic.IAsyncEnumerable<T>! source) -> System.Collections.Generic.IAsyncEnumerable<T>!
116116
static SuperLinq.Async.AsyncSuperEnumerable.Finally<TSource>(this System.Collections.Generic.IAsyncEnumerable<TSource>! source, System.Action! finallyAction) -> System.Collections.Generic.IAsyncEnumerable<TSource>!
117-
static SuperLinq.Async.AsyncSuperEnumerable.FindIndex<TSource>(this System.Collections.Generic.IAsyncEnumerable<TSource>! source, System.Func<TSource, bool>! predicate, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask<int>
118-
static SuperLinq.Async.AsyncSuperEnumerable.FindLastIndex<TSource>(this System.Collections.Generic.IAsyncEnumerable<TSource>! source, System.Func<TSource, bool>! predicate, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask<int>
119117
static SuperLinq.Async.AsyncSuperEnumerable.Fold<T, TResult>(this System.Collections.Generic.IAsyncEnumerable<T>! source, System.Func<T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, TResult>! folder) -> System.Threading.Tasks.ValueTask<TResult>
120118
static SuperLinq.Async.AsyncSuperEnumerable.Fold<T, TResult>(this System.Collections.Generic.IAsyncEnumerable<T>! source, System.Func<T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, TResult>! folder) -> System.Threading.Tasks.ValueTask<TResult>
121119
static SuperLinq.Async.AsyncSuperEnumerable.Fold<T, TResult>(this System.Collections.Generic.IAsyncEnumerable<T>! source, System.Func<T, T, T, T, T, T, T, T, T, T, T, T, T, T, TResult>! folder) -> System.Threading.Tasks.ValueTask<TResult>
@@ -183,21 +181,18 @@ static SuperLinq.Async.AsyncSuperEnumerable.Index<TSource>(this System.Collectio
183181
static SuperLinq.Async.AsyncSuperEnumerable.Index<TSource>(this System.Collections.Generic.IAsyncEnumerable<TSource>! source) -> System.Collections.Generic.IAsyncEnumerable<(int index, TSource item)>!
184182
static SuperLinq.Async.AsyncSuperEnumerable.IndexBy<TSource, TKey>(this System.Collections.Generic.IAsyncEnumerable<TSource>! source, System.Func<TSource, TKey>! keySelector, System.Collections.Generic.IEqualityComparer<TKey>? comparer) -> System.Collections.Generic.IAsyncEnumerable<(int index, TSource item)>!
185183
static SuperLinq.Async.AsyncSuperEnumerable.IndexBy<TSource, TKey>(this System.Collections.Generic.IAsyncEnumerable<TSource>! source, System.Func<TSource, TKey>! keySelector) -> System.Collections.Generic.IAsyncEnumerable<(int index, TSource item)>!
186-
static SuperLinq.Async.AsyncSuperEnumerable.IndexOf<TSource>(this System.Collections.Generic.IAsyncEnumerable<TSource>! source, TSource item, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask<int>
187184
static SuperLinq.Async.AsyncSuperEnumerable.InnerHashJoin<TLeft, TRight, TKey, TResult>(this System.Collections.Generic.IAsyncEnumerable<TLeft>! left, System.Collections.Generic.IAsyncEnumerable<TRight>! right, System.Func<TLeft, TKey>! leftKeySelector, System.Func<TRight, TKey>! rightKeySelector, System.Func<TLeft, TRight, TResult>! bothResultSelector, System.Collections.Generic.IEqualityComparer<TKey>? comparer = null) -> System.Collections.Generic.IAsyncEnumerable<TResult>!
188185
static SuperLinq.Async.AsyncSuperEnumerable.InnerHashJoin<TLeft, TRight, TKey>(this System.Collections.Generic.IAsyncEnumerable<TLeft>! left, System.Collections.Generic.IAsyncEnumerable<TRight>! right, System.Func<TLeft, TKey>! leftKeySelector, System.Func<TRight, TKey>! rightKeySelector, System.Collections.Generic.IEqualityComparer<TKey>? comparer = null) -> System.Collections.Generic.IAsyncEnumerable<(TLeft Left, TRight Right)>!
189186
static SuperLinq.Async.AsyncSuperEnumerable.InnerLoopJoin<TLeft, TRight, TKey, TResult>(this System.Collections.Generic.IAsyncEnumerable<TLeft>! left, System.Collections.Generic.IAsyncEnumerable<TRight>! right, System.Func<TLeft, TKey>! leftKeySelector, System.Func<TRight, TKey>! rightKeySelector, System.Func<TLeft, TRight, TResult>! bothResultSelector, System.Collections.Generic.IEqualityComparer<TKey>? comparer = null) -> System.Collections.Generic.IAsyncEnumerable<TResult>!
190187
static SuperLinq.Async.AsyncSuperEnumerable.InnerLoopJoin<TLeft, TRight, TKey>(this System.Collections.Generic.IAsyncEnumerable<TLeft>! left, System.Collections.Generic.IAsyncEnumerable<TRight>! right, System.Func<TLeft, TKey>! leftKeySelector, System.Func<TRight, TKey>! rightKeySelector, System.Collections.Generic.IEqualityComparer<TKey>? comparer = null) -> System.Collections.Generic.IAsyncEnumerable<(TLeft Left, TRight Right)>!
191188
static SuperLinq.Async.AsyncSuperEnumerable.InnerMergeJoin<TLeft, TRight, TKey, TResult>(this System.Collections.Generic.IAsyncEnumerable<TLeft>! left, System.Collections.Generic.IAsyncEnumerable<TRight>! right, System.Func<TLeft, TKey>! leftKeySelector, System.Func<TRight, TKey>! rightKeySelector, System.Func<TLeft, TRight, TResult>! bothResultSelector, System.Collections.Generic.IComparer<TKey>? comparer = null) -> System.Collections.Generic.IAsyncEnumerable<TResult>!
192189
static SuperLinq.Async.AsyncSuperEnumerable.InnerMergeJoin<TLeft, TRight, TKey>(this System.Collections.Generic.IAsyncEnumerable<TLeft>! left, System.Collections.Generic.IAsyncEnumerable<TRight>! right, System.Func<TLeft, TKey>! leftKeySelector, System.Func<TRight, TKey>! rightKeySelector, System.Collections.Generic.IComparer<TKey>? comparer = null) -> System.Collections.Generic.IAsyncEnumerable<(TLeft Left, TRight Right)>!
193-
static SuperLinq.Async.AsyncSuperEnumerable.Insert<T>(this System.Collections.Generic.IAsyncEnumerable<T>! first, System.Collections.Generic.IAsyncEnumerable<T>! second, int index) -> System.Collections.Generic.IAsyncEnumerable<T>!
194190
static SuperLinq.Async.AsyncSuperEnumerable.Interleave<T>(this System.Collections.Generic.IAsyncEnumerable<T>! source, params System.Collections.Generic.IAsyncEnumerable<T>![]! otherSources) -> System.Collections.Generic.IAsyncEnumerable<T>!
195191
static SuperLinq.Async.AsyncSuperEnumerable.Interleave<T>(this System.Collections.Generic.IEnumerable<System.Collections.Generic.IAsyncEnumerable<T>!>! sources) -> System.Collections.Generic.IAsyncEnumerable<T>!
196192
static SuperLinq.Async.AsyncSuperEnumerable.Lag<TSource, TResult>(this System.Collections.Generic.IAsyncEnumerable<TSource>! source, int offset, System.Func<TSource, TSource?, TResult>! resultSelector) -> System.Collections.Generic.IAsyncEnumerable<TResult>!
197193
static SuperLinq.Async.AsyncSuperEnumerable.Lag<TSource, TResult>(this System.Collections.Generic.IAsyncEnumerable<TSource>! source, int offset, TSource defaultLagValue, System.Func<TSource, TSource, System.Threading.Tasks.ValueTask<TResult>>! resultSelector) -> System.Collections.Generic.IAsyncEnumerable<TResult>!
198194
static SuperLinq.Async.AsyncSuperEnumerable.Lag<TSource, TResult>(this System.Collections.Generic.IAsyncEnumerable<TSource>! source, int offset, TSource defaultLagValue, System.Func<TSource, TSource, TResult>! resultSelector) -> System.Collections.Generic.IAsyncEnumerable<TResult>!
199195
static SuperLinq.Async.AsyncSuperEnumerable.Lag<TSource>(this System.Collections.Generic.IAsyncEnumerable<TSource>! source, int offset) -> System.Collections.Generic.IAsyncEnumerable<(TSource current, TSource? lag)>!
200-
static SuperLinq.Async.AsyncSuperEnumerable.LastIndexOf<TSource>(this System.Collections.Generic.IAsyncEnumerable<TSource>! source, TSource item, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask<int>
201196
static SuperLinq.Async.AsyncSuperEnumerable.Lead<TSource, TResult>(this System.Collections.Generic.IAsyncEnumerable<TSource>! source, int offset, System.Func<TSource, TSource?, TResult>! resultSelector) -> System.Collections.Generic.IAsyncEnumerable<TResult>!
202197
static SuperLinq.Async.AsyncSuperEnumerable.Lead<TSource, TResult>(this System.Collections.Generic.IAsyncEnumerable<TSource>! source, int offset, TSource defaultLeadValue, System.Func<TSource, TSource, System.Threading.Tasks.ValueTask<TResult>>! resultSelector) -> System.Collections.Generic.IAsyncEnumerable<TResult>!
203198
static SuperLinq.Async.AsyncSuperEnumerable.Lead<TSource, TResult>(this System.Collections.Generic.IAsyncEnumerable<TSource>! source, int offset, TSource defaultLeadValue, System.Func<TSource, TSource, TResult>! resultSelector) -> System.Collections.Generic.IAsyncEnumerable<TResult>!
@@ -265,7 +260,6 @@ static SuperLinq.Async.AsyncSuperEnumerable.RankBy<TSource, TKey>(this System.Co
265260
static SuperLinq.Async.AsyncSuperEnumerable.Repeat<TResult>(TResult value) -> System.Collections.Generic.IAsyncEnumerable<TResult>!
266261
static SuperLinq.Async.AsyncSuperEnumerable.Repeat<TSource>(this System.Collections.Generic.IAsyncEnumerable<TSource>! source, int count) -> System.Collections.Generic.IAsyncEnumerable<TSource>!
267262
static SuperLinq.Async.AsyncSuperEnumerable.Repeat<TSource>(this System.Collections.Generic.IAsyncEnumerable<TSource>! source) -> System.Collections.Generic.IAsyncEnumerable<TSource>!
268-
static SuperLinq.Async.AsyncSuperEnumerable.Replace<TSource>(this System.Collections.Generic.IAsyncEnumerable<TSource>! source, int index, TSource value) -> System.Collections.Generic.IAsyncEnumerable<TSource>!
269263
static SuperLinq.Async.AsyncSuperEnumerable.Retry<TSource>(this System.Collections.Generic.IAsyncEnumerable<TSource>! source, int count) -> System.Collections.Generic.IAsyncEnumerable<TSource>!
270264
static SuperLinq.Async.AsyncSuperEnumerable.Retry<TSource>(this System.Collections.Generic.IAsyncEnumerable<TSource>! source) -> System.Collections.Generic.IAsyncEnumerable<TSource>!
271265
static SuperLinq.Async.AsyncSuperEnumerable.Return<T>(T item) -> System.Collections.Generic.IAsyncEnumerable<T>!

Source/SuperLinq.Async/Replace.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
namespace SuperLinq.Async;
1+
#if !NO_INDEX
2+
3+
namespace SuperLinq.Async;
24

35
public static partial class AsyncSuperEnumerable
46
{
@@ -51,11 +53,7 @@ static async IAsyncEnumerable<TSource> Core(
5153
/// <remarks>
5254
/// This operator evaluates in a deferred and streaming manner.
5355
/// </remarks>
54-
#if NETCOREAPP
5556
public static IAsyncEnumerable<TSource> Replace<TSource>(
56-
#else
57-
internal static IAsyncEnumerable<TSource> Replace<TSource>(
58-
#endif
5957
this IAsyncEnumerable<TSource> source,
6058
Index index,
6159
TSource value)
@@ -102,3 +100,5 @@ static async IAsyncEnumerable<TSource> Core(
102100
}
103101
}
104102
}
103+
104+
#endif

0 commit comments

Comments
 (0)