diff --git a/Directory.Packages.props b/Directory.Packages.props
index 6a98636f..6b0b4140 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -9,6 +9,7 @@
+
@@ -17,6 +18,7 @@
+
@@ -31,7 +33,6 @@
-
diff --git a/Source/SuperLinq.Async/ElementAt.cs b/Source/SuperLinq.Async/ElementAt.cs
index a55647c3..af4d5a5b 100644
--- a/Source/SuperLinq.Async/ElementAt.cs
+++ b/Source/SuperLinq.Async/ElementAt.cs
@@ -1,6 +1,8 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+#if !NO_INDEX
+
namespace SuperLinq.Async;
public static partial class AsyncSuperEnumerable
@@ -101,3 +103,5 @@ CancellationToken cancellationToken
return (false, default);
}
}
+
+#endif
diff --git a/Source/SuperLinq.Async/FindIndex.cs b/Source/SuperLinq.Async/FindIndex.cs
index 8fc52fed..bb04ece2 100644
--- a/Source/SuperLinq.Async/FindIndex.cs
+++ b/Source/SuperLinq.Async/FindIndex.cs
@@ -1,3 +1,5 @@
+#if !NO_INDEX
+
namespace SuperLinq.Async;
public static partial class AsyncSuperEnumerable
@@ -202,3 +204,5 @@ CancellationToken cancellationToken
}
}
}
+
+#endif
diff --git a/Source/SuperLinq.Async/FindLastIndex.cs b/Source/SuperLinq.Async/FindLastIndex.cs
index 83dad504..5051bc28 100644
--- a/Source/SuperLinq.Async/FindLastIndex.cs
+++ b/Source/SuperLinq.Async/FindLastIndex.cs
@@ -1,3 +1,5 @@
+#if !NO_INDEX
+
namespace SuperLinq.Async;
public static partial class AsyncSuperEnumerable
@@ -187,3 +189,5 @@ CancellationToken cancellationToken
}
}
}
+
+#endif
diff --git a/Source/SuperLinq.Async/GetShortestPath.cs b/Source/SuperLinq.Async/GetShortestPath.cs
index c4aa54ca..74bfd75b 100644
--- a/Source/SuperLinq.Async/GetShortestPath.cs
+++ b/Source/SuperLinq.Async/GetShortestPath.cs
@@ -812,7 +812,7 @@ public partial class AsyncSuperEnumerable
var queue = new UpdatablePriorityQueue(
16,
priorityComparer: Comparer<(TState? parent, TCost? cost)>.Create(
- (x, y) => costComparer.Compare(x.cost, y.cost)),
+ (x, y) => costComparer.Compare(x.cost!, y.cost!)),
stateComparer);
var current = start;
@@ -1154,7 +1154,7 @@ public partial class AsyncSuperEnumerable
cancellationToken.ThrowIfCancellationRequested();
if (!totalCost.TryGetValue(current, out var oldCost)
- || costComparer.Compare(costs.traversed, oldCost) < 0)
+ || costComparer.Compare(costs.traversed!, oldCost!) < 0)
{
totalCost[current] = costs.traversed;
if (await predicate(current).ConfigureAwait(false))
@@ -1503,7 +1503,7 @@ public partial class AsyncSuperEnumerable
cancellationToken.ThrowIfCancellationRequested();
if (!totalCost.TryGetValue(current, out var oldCost)
- || costComparer.Compare(from.traversed, oldCost.traversed) < 0)
+ || costComparer.Compare(from.traversed!, oldCost.traversed!) < 0)
{
totalCost[current] = (from.parent, from.traversed);
if (await predicate(current).ConfigureAwait(false))
diff --git a/Source/SuperLinq.Async/IAsyncBuffer.cs b/Source/SuperLinq.Async/IAsyncBuffer.cs
index ba8684a7..a4099a54 100644
--- a/Source/SuperLinq.Async/IAsyncBuffer.cs
+++ b/Source/SuperLinq.Async/IAsyncBuffer.cs
@@ -1,4 +1,4 @@
-namespace SuperLinq.Async;
+namespace SuperLinq.Async;
///
/// Represents a cached sequence that can be re-enumerated multiple times.
@@ -20,6 +20,7 @@ public interface IAsyncBuffer : IAsyncEnumerable, IAsyncDisposable
///
int Count { get; }
+#if NETCOREAPP
///
/// Configures how awaits on the tasks returned from an async disposable are performed.
///
@@ -31,4 +32,5 @@ public interface IAsyncBuffer : IAsyncEnumerable, IAsyncDisposable
///
public ConfiguredAsyncDisposable ConfigureAwait(bool continueOnCapturedContext) =>
((IAsyncDisposable)this).ConfigureAwait(continueOnCapturedContext);
+#endif
}
diff --git a/Source/SuperLinq.Async/IndexOf.cs b/Source/SuperLinq.Async/IndexOf.cs
index 5cd5bcdf..c612a16e 100644
--- a/Source/SuperLinq.Async/IndexOf.cs
+++ b/Source/SuperLinq.Async/IndexOf.cs
@@ -1,3 +1,5 @@
+#if !NO_INDEX
+
namespace SuperLinq.Async;
public static partial class AsyncSuperEnumerable
@@ -126,3 +128,5 @@ public static ValueTask IndexOf(
return FindIndex(source, i => EqualityComparer.Default.Equals(i, item), index, count, cancellationToken);
}
}
+
+#endif
diff --git a/Source/SuperLinq.Async/Insert.cs b/Source/SuperLinq.Async/Insert.cs
index 3047a520..ce08113c 100644
--- a/Source/SuperLinq.Async/Insert.cs
+++ b/Source/SuperLinq.Async/Insert.cs
@@ -1,3 +1,5 @@
+#if !NO_INDEX
+
namespace SuperLinq.Async;
public static partial class AsyncSuperEnumerable
@@ -136,3 +138,5 @@ static async IAsyncEnumerable Core(
}
}
}
+
+#endif
diff --git a/Source/SuperLinq.Async/Join.MergeJoin.cs b/Source/SuperLinq.Async/Join.MergeJoin.cs
index d1b26a85..d499a91f 100644
--- a/Source/SuperLinq.Async/Join.MergeJoin.cs
+++ b/Source/SuperLinq.Async/Join.MergeJoin.cs
@@ -722,6 +722,10 @@ file sealed class ComparerEqualityComparer(
IComparer comparer
) : IEqualityComparer
{
- public bool Equals([AllowNull] TKey x, [AllowNull] TKey y) => comparer.Compare(x, y) == 0;
+ public bool Equals([AllowNull] TKey x, [AllowNull] TKey y) => comparer.Compare(x!, y!) == 0;
+#if NETCOREAPP
public int GetHashCode([DisallowNull] TKey obj) => ThrowHelper.ThrowNotSupportedException();
+#else
+ public int GetHashCode(TKey obj) => ThrowHelper.ThrowNotSupportedException();
+#endif
}
diff --git a/Source/SuperLinq.Async/LastIndexOf.cs b/Source/SuperLinq.Async/LastIndexOf.cs
index c314851f..e46ae2b5 100644
--- a/Source/SuperLinq.Async/LastIndexOf.cs
+++ b/Source/SuperLinq.Async/LastIndexOf.cs
@@ -1,3 +1,5 @@
+#if !NO_INDEX
+
namespace SuperLinq.Async;
public static partial class AsyncSuperEnumerable
@@ -135,3 +137,5 @@ public static ValueTask LastIndexOf(
);
}
}
+
+#endif
diff --git a/Source/SuperLinq.Async/PublicAPI/netstandard2.0/PublicAPI.Shipped.txt b/Source/SuperLinq.Async/PublicAPI/netstandard2.0/PublicAPI.Shipped.txt
new file mode 100644
index 00000000..7dc5c581
--- /dev/null
+++ b/Source/SuperLinq.Async/PublicAPI/netstandard2.0/PublicAPI.Shipped.txt
@@ -0,0 +1 @@
+#nullable enable
diff --git a/Source/SuperLinq.Async/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt b/Source/SuperLinq.Async/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt
new file mode 100644
index 00000000..86cc8f2a
--- /dev/null
+++ b/Source/SuperLinq.Async/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt
@@ -0,0 +1,366 @@
+static SuperLinq.Async.AsyncSuperEnumerable.AggregateBy(this System.Collections.Generic.IAsyncEnumerable! source, System.Func! keySelector, System.Func! seedSelector, System.Func! func, System.Collections.Generic.IEqualityComparer? comparer = null) -> System.Collections.Generic.IAsyncEnumerable>!
+static SuperLinq.Async.AsyncSuperEnumerable.AggregateBy(this System.Collections.Generic.IAsyncEnumerable! source, System.Func! keySelector, TAccumulate seed, System.Func! func, System.Collections.Generic.IEqualityComparer? comparer = null) -> System.Collections.Generic.IAsyncEnumerable>!
+static SuperLinq.Async.AsyncSuperEnumerable.AggregateRight(this System.Collections.Generic.IAsyncEnumerable! source, TAccumulate seed, System.Func>! func, System.Func>! resultSelector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask
+static SuperLinq.Async.AsyncSuperEnumerable.AggregateRight(this System.Collections.Generic.IAsyncEnumerable! source, TAccumulate seed, System.Func>! func, System.Func>! resultSelector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask
+static SuperLinq.Async.AsyncSuperEnumerable.AggregateRight(this System.Collections.Generic.IAsyncEnumerable! source, TAccumulate seed, System.Func! func, System.Func! resultSelector, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask
+static SuperLinq.Async.AsyncSuperEnumerable.AggregateRight(this System.Collections.Generic.IAsyncEnumerable! source, TAccumulate seed, System.Func>! func, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask
+static SuperLinq.Async.AsyncSuperEnumerable.AggregateRight(this System.Collections.Generic.IAsyncEnumerable! source, TAccumulate seed, System.Func>! func, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask
+static SuperLinq.Async.AsyncSuperEnumerable.AggregateRight(this System.Collections.Generic.IAsyncEnumerable! source, TAccumulate seed, System.Func! func, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask
+static SuperLinq.Async.AsyncSuperEnumerable.AggregateRight(this System.Collections.Generic.IAsyncEnumerable! source, System.Func>! func, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask
+static SuperLinq.Async.AsyncSuperEnumerable.AggregateRight(this System.Collections.Generic.IAsyncEnumerable! source, System.Func>! func, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask
+static SuperLinq.Async.AsyncSuperEnumerable.AggregateRight(this System.Collections.Generic.IAsyncEnumerable! source, System.Func! func, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask
+static SuperLinq.Async.AsyncSuperEnumerable.Amb(this System.Collections.Generic.IAsyncEnumerable! source, params System.Collections.Generic.IAsyncEnumerable![]! otherSources) -> System.Collections.Generic.IAsyncEnumerable!
+static SuperLinq.Async.AsyncSuperEnumerable.Amb(this System.Collections.Generic.IEnumerable!>! sources) -> System.Collections.Generic.IAsyncEnumerable!
+static SuperLinq.Async.AsyncSuperEnumerable.AssertCount(this System.Collections.Generic.IAsyncEnumerable! source, int count) -> System.Collections.Generic.IAsyncEnumerable!
+static SuperLinq.Async.AsyncSuperEnumerable.AtLeast(this System.Collections.Generic.IAsyncEnumerable! source, int count, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask
+static SuperLinq.Async.AsyncSuperEnumerable.AtMost(this System.Collections.Generic.IAsyncEnumerable! source, int count, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask
+static SuperLinq.Async.AsyncSuperEnumerable.Batch(this System.Collections.Generic.IAsyncEnumerable! source, int size) -> System.Collections.Generic.IAsyncEnumerable!>!
+static SuperLinq.Async.AsyncSuperEnumerable.BindByIndex(this System.Collections.Generic.IAsyncEnumerable! source, System.Collections.Generic.IAsyncEnumerable! indices, System.Func! resultSelector, System.Func! missingSelector) -> System.Collections.Generic.IAsyncEnumerable!
+static SuperLinq.Async.AsyncSuperEnumerable.BindByIndex(this System.Collections.Generic.IAsyncEnumerable! source, System.Collections.Generic.IAsyncEnumerable! indices) -> System.Collections.Generic.IAsyncEnumerable!
+static SuperLinq.Async.AsyncSuperEnumerable.Buffer(this System.Collections.Generic.IAsyncEnumerable! source, int count, int skip) -> System.Collections.Generic.IAsyncEnumerable!>!
+static SuperLinq.Async.AsyncSuperEnumerable.Buffer(this System.Collections.Generic.IAsyncEnumerable! source, int count) -> System.Collections.Generic.IAsyncEnumerable!>!
+static SuperLinq.Async.AsyncSuperEnumerable.Case(System.Func>! selector, System.Collections.Generic.IDictionary!>! sources, System.Collections.Generic.IAsyncEnumerable! defaultSource) -> System.Collections.Generic.IAsyncEnumerable!
+static SuperLinq.Async.AsyncSuperEnumerable.Case(System.Func>! selector, System.Collections.Generic.IDictionary!>! sources) -> System.Collections.Generic.IAsyncEnumerable!
+static SuperLinq.Async.AsyncSuperEnumerable.Case(System.Func! selector, System.Collections.Generic.IDictionary!>! sources, System.Collections.Generic.IAsyncEnumerable! defaultSource) -> System.Collections.Generic.IAsyncEnumerable!
+static SuperLinq.Async.AsyncSuperEnumerable.Case(System.Func! selector, System.Collections.Generic.IDictionary!>! sources) -> System.Collections.Generic.IAsyncEnumerable!
+static SuperLinq.Async.AsyncSuperEnumerable.Catch(this System.Collections.Generic.IAsyncEnumerable! source, System.Func!>! handler) -> System.Collections.Generic.IAsyncEnumerable!
+static SuperLinq.Async.AsyncSuperEnumerable.Catch(params System.Collections.Generic.IAsyncEnumerable![]! sources) -> System.Collections.Generic.IAsyncEnumerable!
+static SuperLinq.Async.AsyncSuperEnumerable.Catch(this System.Collections.Generic.IAsyncEnumerable!>! sources) -> System.Collections.Generic.IAsyncEnumerable!
+static SuperLinq.Async.AsyncSuperEnumerable.Catch(this System.Collections.Generic.IAsyncEnumerable! first, System.Collections.Generic.IAsyncEnumerable! second) -> System.Collections.Generic.IAsyncEnumerable!
+static SuperLinq.Async.AsyncSuperEnumerable.Catch(this System.Collections.Generic.IEnumerable!>! sources) -> System.Collections.Generic.IAsyncEnumerable!
+static SuperLinq.Async.AsyncSuperEnumerable.Choose(this System.Collections.Generic.IAsyncEnumerable! source, System.Func! chooser) -> System.Collections.Generic.IAsyncEnumerable!
+static SuperLinq.Async.AsyncSuperEnumerable.Choose(this System.Collections.Generic.IAsyncEnumerable! source, System.Func>! chooser) -> System.Collections.Generic.IAsyncEnumerable!
+static SuperLinq.Async.AsyncSuperEnumerable.Choose(this System.Collections.Generic.IAsyncEnumerable! source, System.Func>! chooser) -> System.Collections.Generic.IAsyncEnumerable!
+static SuperLinq.Async.AsyncSuperEnumerable.CollectionEqual(this System.Collections.Generic.IAsyncEnumerable! first, System.Collections.Generic.IAsyncEnumerable! second, System.Collections.Generic.IEqualityComparer? comparer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask
+static SuperLinq.Async.AsyncSuperEnumerable.CollectionEqual(this System.Collections.Generic.IAsyncEnumerable! first, System.Collections.Generic.IAsyncEnumerable! second, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask
+static SuperLinq.Async.AsyncSuperEnumerable.CompareCount(this System.Collections.Generic.IAsyncEnumerable! first, System.Collections.Generic.IAsyncEnumerable! second, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask
+static SuperLinq.Async.AsyncSuperEnumerable.ConcurrentMerge(this System.Collections.Generic.IAsyncEnumerable! source, params System.Collections.Generic.IAsyncEnumerable![]! otherSources) -> System.Collections.Generic.IAsyncEnumerable!
+static SuperLinq.Async.AsyncSuperEnumerable.ConcurrentMerge(this System.Collections.Generic.IEnumerable!>! sources, int maxConcurrency) -> System.Collections.Generic.IAsyncEnumerable!
+static SuperLinq.Async.AsyncSuperEnumerable.ConcurrentMerge(this System.Collections.Generic.IEnumerable!>! sources) -> System.Collections.Generic.IAsyncEnumerable!
+static SuperLinq.Async.AsyncSuperEnumerable.Consume(this System.Collections.Generic.IAsyncEnumerable! source, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask
+static SuperLinq.Async.AsyncSuperEnumerable.CopyTo(this System.Collections.Generic.IAsyncEnumerable! source, System.Collections.Generic.IList! list, int index, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask
+static SuperLinq.Async.AsyncSuperEnumerable.CopyTo(this System.Collections.Generic.IAsyncEnumerable! source, System.Collections.Generic.IList! list, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask
+static SuperLinq.Async.AsyncSuperEnumerable.CountBetween(this System.Collections.Generic.IAsyncEnumerable! source, int min, int max, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask
+static SuperLinq.Async.AsyncSuperEnumerable.CountBy(this System.Collections.Generic.IAsyncEnumerable! source, System.Func! keySelector, System.Collections.Generic.IEqualityComparer? comparer) -> System.Collections.Generic.IAsyncEnumerable>!
+static SuperLinq.Async.AsyncSuperEnumerable.CountBy(this System.Collections.Generic.IAsyncEnumerable! source, System.Func! keySelector) -> System.Collections.Generic.IAsyncEnumerable>!
+static SuperLinq.Async.AsyncSuperEnumerable.CountDown(this System.Collections.Generic.IAsyncEnumerable! source, int count, System.Func! resultSelector) -> System.Collections.Generic.IAsyncEnumerable!
+static SuperLinq.Async.AsyncSuperEnumerable.CountDown(this System.Collections.Generic.IAsyncEnumerable! source, int count) -> System.Collections.Generic.IAsyncEnumerable<(TSource item, int? count)>!
+static SuperLinq.Async.AsyncSuperEnumerable.Defer(System.Func!>! enumerableFactory) -> System.Collections.Generic.IAsyncEnumerable!
+static SuperLinq.Async.AsyncSuperEnumerable.DensePartialSort(this System.Collections.Generic.IAsyncEnumerable! source, int count, SuperLinq.OrderByDirection direction) -> System.Collections.Generic.IAsyncEnumerable!
+static SuperLinq.Async.AsyncSuperEnumerable.DensePartialSort(this System.Collections.Generic.IAsyncEnumerable! source, int count, System.Collections.Generic.IComparer? comparer, SuperLinq.OrderByDirection direction) -> System.Collections.Generic.IAsyncEnumerable!
+static SuperLinq.Async.AsyncSuperEnumerable.DensePartialSort(this System.Collections.Generic.IAsyncEnumerable! source, int count, System.Collections.Generic.IComparer? comparer) -> System.Collections.Generic.IAsyncEnumerable!
+static SuperLinq.Async.AsyncSuperEnumerable.DensePartialSort(this System.Collections.Generic.IAsyncEnumerable! source, int count) -> System.Collections.Generic.IAsyncEnumerable!
+static SuperLinq.Async.AsyncSuperEnumerable.DensePartialSortBy(this System.Collections.Generic.IAsyncEnumerable! source, int count, System.Func! keySelector, SuperLinq.OrderByDirection direction) -> System.Collections.Generic.IAsyncEnumerable!
+static SuperLinq.Async.AsyncSuperEnumerable.DensePartialSortBy(this System.Collections.Generic.IAsyncEnumerable! source, int count, System.Func! keySelector, System.Collections.Generic.IComparer? comparer, SuperLinq.OrderByDirection direction) -> System.Collections.Generic.IAsyncEnumerable!
+static SuperLinq.Async.AsyncSuperEnumerable.DensePartialSortBy(this System.Collections.Generic.IAsyncEnumerable! source, int count, System.Func! keySelector, System.Collections.Generic.IComparer? comparer) -> System.Collections.Generic.IAsyncEnumerable!
+static SuperLinq.Async.AsyncSuperEnumerable.DensePartialSortBy(this System.Collections.Generic.IAsyncEnumerable! source, int count, System.Func! keySelector) -> System.Collections.Generic.IAsyncEnumerable!
+static SuperLinq.Async.AsyncSuperEnumerable.DenseRank(this System.Collections.Generic.IAsyncEnumerable! source, SuperLinq.OrderByDirection sortDirection) -> System.Collections.Generic.IAsyncEnumerable<(TSource item, int rank)>!
+static SuperLinq.Async.AsyncSuperEnumerable.DenseRank(this System.Collections.Generic.IAsyncEnumerable! source, System.Collections.Generic.IComparer! comparer, SuperLinq.OrderByDirection sortDirection) -> System.Collections.Generic.IAsyncEnumerable<(TSource item, int rank)>!
+static SuperLinq.Async.AsyncSuperEnumerable.DenseRank(this System.Collections.Generic.IAsyncEnumerable! source, System.Collections.Generic.IComparer! comparer) -> System.Collections.Generic.IAsyncEnumerable<(TSource item, int rank)>!
+static SuperLinq.Async.AsyncSuperEnumerable.DenseRank(this System.Collections.Generic.IAsyncEnumerable! source) -> System.Collections.Generic.IAsyncEnumerable<(TSource item, int rank)>!
+static SuperLinq.Async.AsyncSuperEnumerable.DenseRankBy(this System.Collections.Generic.IAsyncEnumerable! source, System.Func! keySelector, SuperLinq.OrderByDirection sortDirection) -> System.Collections.Generic.IAsyncEnumerable<(TSource item, int rank)>!
+static SuperLinq.Async.AsyncSuperEnumerable.DenseRankBy(this System.Collections.Generic.IAsyncEnumerable! source, System.Func! keySelector, System.Collections.Generic.IComparer! comparer, SuperLinq.OrderByDirection sortDirection) -> System.Collections.Generic.IAsyncEnumerable<(TSource item, int rank)>!
+static SuperLinq.Async.AsyncSuperEnumerable.DenseRankBy(this System.Collections.Generic.IAsyncEnumerable! source, System.Func! keySelector, System.Collections.Generic.IComparer