From 22a97efe395d9b4d0f7bdc1623d2982392d2bd22 Mon Sep 17 00:00:00 2001 From: Bouke Haarsma Date: Tue, 16 Jul 2024 09:04:42 +0200 Subject: [PATCH] # This is a combination of 2 commits. # This is the 1st commit message: Hide API using Index/Range The polyfills generated by PolySharp cannot be made public as there will be conflicts with the polyfills generated by others. # The commit message #2 will be skipped: # fixup! Hide API using Index/Range --- Source/SuperLinq.Async/ElementAt.cs | 8 ++++++ Source/SuperLinq.Async/FindIndex.cs | 8 ++++++ Source/SuperLinq.Async/FindLastIndex.cs | 8 ++++++ Source/SuperLinq.Async/IndexOf.cs | 8 ++++++ Source/SuperLinq.Async/Insert.cs | 4 +++ Source/SuperLinq.Async/LastIndexOf.cs | 8 ++++++ .../netstandard2.0/PublicAPI.Unshipped.txt | 13 --------- Source/SuperLinq.Async/Replace.cs | 4 +++ Source/SuperLinq.Async/SuperLinq.Async.csproj | 8 +++++- Source/SuperLinq.Async/Take.cs | 4 +++ Source/SuperLinq/ElementAt.cs | 8 ++++-- Source/SuperLinq/Exclude.cs | 4 +++ Source/SuperLinq/FindIndex.cs | 8 ++++++ Source/SuperLinq/FindLastIndex.cs | 8 ++++++ Source/SuperLinq/IndexOf.cs | 8 ++++++ Source/SuperLinq/Insert.cs | 4 +++ Source/SuperLinq/LastIndexOf.cs | 8 ++++++ .../netstandard2.0/PublicAPI.Unshipped.txt | 14 ---------- Source/SuperLinq/Replace.cs | 9 ++++--- Source/SuperLinq/SuperLinq.csproj | 12 ++++++++- Source/SuperLinq/Take.cs | 6 +++-- .../SuperLinq.Async.Test/NullArgumentTest.cs | 1 + .../SuperLinq.Async.Test.csproj | 2 ++ Tests/SuperLinq.Test/ExcludeTest.cs | 4 +++ Tests/SuperLinq.Test/InsertTest.cs | 2 ++ Tests/SuperLinq.Test/NullArgumentTest.cs | 1 + Tests/SuperLinq.Test/SuperLinq.Test.csproj | 27 ++++++++++++------- 27 files changed, 153 insertions(+), 46 deletions(-) diff --git a/Source/SuperLinq.Async/ElementAt.cs b/Source/SuperLinq.Async/ElementAt.cs index a55647c3..d9d1abca 100644 --- a/Source/SuperLinq.Async/ElementAt.cs +++ b/Source/SuperLinq.Async/ElementAt.cs @@ -19,7 +19,11 @@ public static partial class AsyncSuperEnumerable /// To instead return a default value when the specified index is out of range, /// use the method. /// +#if NETCOREAPP public static ValueTask ElementAtAsync( +#else + internal static ValueTask ElementAtAsync( +#endif this IAsyncEnumerable source, Index index, CancellationToken cancellationToken = default @@ -52,7 +56,11 @@ static async ValueTask Core(IAsyncEnumerable source, Index ind /// /// The default value for reference and nullable types is . /// +#if NETCOREAPP public static ValueTask ElementAtOrDefaultAsync( +#else + internal static ValueTask ElementAtOrDefaultAsync( +#endif this IAsyncEnumerable source, Index index, CancellationToken cancellationToken = default diff --git a/Source/SuperLinq.Async/FindIndex.cs b/Source/SuperLinq.Async/FindIndex.cs index 8fc52fed..9259428e 100644 --- a/Source/SuperLinq.Async/FindIndex.cs +++ b/Source/SuperLinq.Async/FindIndex.cs @@ -74,7 +74,11 @@ public static ValueTask FindIndex( /// This operator executes immediately. /// /// +#if NETCOREAPP public static ValueTask FindIndex( +#else + internal static ValueTask FindIndex( +#endif this IAsyncEnumerable source, Func predicate, Index index, @@ -120,7 +124,11 @@ public static ValueTask FindIndex( /// This operator executes immediately. /// /// +#if NETCOREAPP public static ValueTask FindIndex( +#else + internal static ValueTask FindIndex( +#endif this IAsyncEnumerable source, Func predicate, Index index, diff --git a/Source/SuperLinq.Async/FindLastIndex.cs b/Source/SuperLinq.Async/FindLastIndex.cs index 83dad504..5657d506 100644 --- a/Source/SuperLinq.Async/FindLastIndex.cs +++ b/Source/SuperLinq.Async/FindLastIndex.cs @@ -76,7 +76,11 @@ public static ValueTask FindLastIndex( /// This operator executes immediately. /// /// +#if NETCOREAPP public static ValueTask FindLastIndex( +#else + internal static ValueTask FindLastIndex( +#endif this IAsyncEnumerable source, Func predicate, Index index, @@ -124,7 +128,11 @@ public static ValueTask FindLastIndex( /// This operator executes immediately. /// /// +#if NETCOREAPP public static ValueTask FindLastIndex( +#else + internal static ValueTask FindLastIndex( +#endif this IAsyncEnumerable source, Func predicate, Index index, diff --git a/Source/SuperLinq.Async/IndexOf.cs b/Source/SuperLinq.Async/IndexOf.cs index 5cd5bcdf..0e713e44 100644 --- a/Source/SuperLinq.Async/IndexOf.cs +++ b/Source/SuperLinq.Async/IndexOf.cs @@ -71,7 +71,11 @@ public static ValueTask IndexOf( /// This operator executes immediately. /// /// +#if NETCOREAPP public static ValueTask IndexOf( +#else + internal static ValueTask IndexOf( +#endif this IAsyncEnumerable source, TSource item, Index index, @@ -115,7 +119,11 @@ public static ValueTask IndexOf( /// This operator executes immediately. /// /// +#if NETCOREAPP public static ValueTask IndexOf( +#else + internal static ValueTask IndexOf( +#endif this IAsyncEnumerable source, TSource item, Index index, diff --git a/Source/SuperLinq.Async/Insert.cs b/Source/SuperLinq.Async/Insert.cs index 3047a520..5c10b624 100644 --- a/Source/SuperLinq.Async/Insert.cs +++ b/Source/SuperLinq.Async/Insert.cs @@ -91,7 +91,11 @@ static async IAsyncEnumerable Core( /// yielding the next element after having iterated /// entirely. /// +#if NETCOREAPP public static IAsyncEnumerable Insert(this IAsyncEnumerable first, IAsyncEnumerable second, Index index) +#else + internal static IAsyncEnumerable Insert(this IAsyncEnumerable first, IAsyncEnumerable second, Index index) +#endif { ArgumentNullException.ThrowIfNull(first); ArgumentNullException.ThrowIfNull(second); diff --git a/Source/SuperLinq.Async/LastIndexOf.cs b/Source/SuperLinq.Async/LastIndexOf.cs index c314851f..04f19c74 100644 --- a/Source/SuperLinq.Async/LastIndexOf.cs +++ b/Source/SuperLinq.Async/LastIndexOf.cs @@ -73,7 +73,11 @@ public static ValueTask LastIndexOf( /// This operator executes immediately. /// /// +#if NETCOREAPP public static ValueTask LastIndexOf( +#else + internal static ValueTask LastIndexOf( +#endif this IAsyncEnumerable source, TSource item, Index index, @@ -118,7 +122,11 @@ public static ValueTask LastIndexOf( /// This operator executes immediately. /// /// +#if NETCOREAPP public static ValueTask LastIndexOf( +#else + internal static ValueTask LastIndexOf( +#endif this IAsyncEnumerable source, TSource item, Index index, diff --git a/Source/SuperLinq.Async/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt b/Source/SuperLinq.Async/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt index d2ccdbc7..b5e235ec 100644 --- a/Source/SuperLinq.Async/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt +++ b/Source/SuperLinq.Async/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt @@ -81,8 +81,6 @@ static SuperLinq.Async.AsyncSuperEnumerable.Do(this System.Collections. static SuperLinq.Async.AsyncSuperEnumerable.DoWhile(this System.Collections.Generic.IAsyncEnumerable source, System.Func condition) -> System.Collections.Generic.IAsyncEnumerable static SuperLinq.Async.AsyncSuperEnumerable.DoWhile(this System.Collections.Generic.IAsyncEnumerable source, System.Func> condition) -> System.Collections.Generic.IAsyncEnumerable static SuperLinq.Async.AsyncSuperEnumerable.Duplicates(this System.Collections.Generic.IAsyncEnumerable source, System.Collections.Generic.IEqualityComparer comparer = null) -> System.Collections.Generic.IAsyncEnumerable -static SuperLinq.Async.AsyncSuperEnumerable.ElementAtAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Index index, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask -static SuperLinq.Async.AsyncSuperEnumerable.ElementAtOrDefaultAsync(this System.Collections.Generic.IAsyncEnumerable source, System.Index index, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask static SuperLinq.Async.AsyncSuperEnumerable.EndsWith(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.EndsWith(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.EndsWith(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IEnumerable second, System.Collections.Generic.IEqualityComparer comparer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask @@ -110,11 +108,7 @@ static SuperLinq.Async.AsyncSuperEnumerable.FillForward(this System.Collectio static SuperLinq.Async.AsyncSuperEnumerable.FillForward(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Func> fillSelector) -> System.Collections.Generic.IAsyncEnumerable static SuperLinq.Async.AsyncSuperEnumerable.FillForward(this System.Collections.Generic.IAsyncEnumerable source, System.Func> predicate, System.Func fillSelector) -> System.Collections.Generic.IAsyncEnumerable static SuperLinq.Async.AsyncSuperEnumerable.Finally(this System.Collections.Generic.IAsyncEnumerable source, System.Action finallyAction) -> System.Collections.Generic.IAsyncEnumerable -static SuperLinq.Async.AsyncSuperEnumerable.FindIndex(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Index index, int count, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask -static SuperLinq.Async.AsyncSuperEnumerable.FindIndex(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Index index, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask static SuperLinq.Async.AsyncSuperEnumerable.FindIndex(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask -static SuperLinq.Async.AsyncSuperEnumerable.FindLastIndex(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Index index, int count, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask -static SuperLinq.Async.AsyncSuperEnumerable.FindLastIndex(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Index index, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask static SuperLinq.Async.AsyncSuperEnumerable.FindLastIndex(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask static SuperLinq.Async.AsyncSuperEnumerable.ForEach(this System.Collections.Generic.IAsyncEnumerable source, System.Action action, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask static SuperLinq.Async.AsyncSuperEnumerable.ForEach(this System.Collections.Generic.IAsyncEnumerable source, System.Action action, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask @@ -167,8 +161,6 @@ static SuperLinq.Async.AsyncSuperEnumerable.Index(this System.Collectio static SuperLinq.Async.AsyncSuperEnumerable.Index(this System.Collections.Generic.IAsyncEnumerable source, int startIndex) -> System.Collections.Generic.IAsyncEnumerable<(int index, TSource item)> static SuperLinq.Async.AsyncSuperEnumerable.IndexBy(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector) -> System.Collections.Generic.IAsyncEnumerable<(int index, TSource item)> static SuperLinq.Async.AsyncSuperEnumerable.IndexBy(this System.Collections.Generic.IAsyncEnumerable source, System.Func keySelector, System.Collections.Generic.IEqualityComparer comparer) -> System.Collections.Generic.IAsyncEnumerable<(int index, TSource item)> -static SuperLinq.Async.AsyncSuperEnumerable.IndexOf(this System.Collections.Generic.IAsyncEnumerable source, TSource item, System.Index index, int count, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask -static SuperLinq.Async.AsyncSuperEnumerable.IndexOf(this System.Collections.Generic.IAsyncEnumerable source, TSource item, System.Index index, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask static SuperLinq.Async.AsyncSuperEnumerable.IndexOf(this System.Collections.Generic.IAsyncEnumerable source, TSource item, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask static SuperLinq.Async.AsyncSuperEnumerable.InnerHashJoin(this System.Collections.Generic.IAsyncEnumerable left, System.Collections.Generic.IAsyncEnumerable right, System.Func leftKeySelector, System.Func rightKeySelector, System.Func bothResultSelector, System.Collections.Generic.IEqualityComparer comparer = null) -> System.Collections.Generic.IAsyncEnumerable static SuperLinq.Async.AsyncSuperEnumerable.InnerHashJoin(this System.Collections.Generic.IAsyncEnumerable left, System.Collections.Generic.IAsyncEnumerable right, System.Func leftKeySelector, System.Func rightKeySelector, System.Collections.Generic.IEqualityComparer comparer = null) -> System.Collections.Generic.IAsyncEnumerable<(TLeft Left, TRight Right)> @@ -177,15 +169,12 @@ static SuperLinq.Async.AsyncSuperEnumerable.InnerLoopJoin(t static SuperLinq.Async.AsyncSuperEnumerable.InnerMergeJoin(this System.Collections.Generic.IAsyncEnumerable left, System.Collections.Generic.IAsyncEnumerable right, System.Func leftKeySelector, System.Func rightKeySelector, System.Func bothResultSelector, System.Collections.Generic.IComparer comparer = null) -> System.Collections.Generic.IAsyncEnumerable static SuperLinq.Async.AsyncSuperEnumerable.InnerMergeJoin(this System.Collections.Generic.IAsyncEnumerable left, System.Collections.Generic.IAsyncEnumerable right, System.Func leftKeySelector, System.Func rightKeySelector, System.Collections.Generic.IComparer comparer = null) -> System.Collections.Generic.IAsyncEnumerable<(TLeft Left, TRight Right)> static SuperLinq.Async.AsyncSuperEnumerable.Insert(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second, int index) -> System.Collections.Generic.IAsyncEnumerable -static SuperLinq.Async.AsyncSuperEnumerable.Insert(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IAsyncEnumerable second, System.Index index) -> System.Collections.Generic.IAsyncEnumerable static SuperLinq.Async.AsyncSuperEnumerable.Interleave(this System.Collections.Generic.IAsyncEnumerable source, params System.Collections.Generic.IAsyncEnumerable[] otherSources) -> System.Collections.Generic.IAsyncEnumerable static SuperLinq.Async.AsyncSuperEnumerable.Interleave(this System.Collections.Generic.IEnumerable> sources) -> System.Collections.Generic.IAsyncEnumerable static SuperLinq.Async.AsyncSuperEnumerable.Lag(this System.Collections.Generic.IAsyncEnumerable source, int offset, System.Func resultSelector) -> System.Collections.Generic.IAsyncEnumerable static SuperLinq.Async.AsyncSuperEnumerable.Lag(this System.Collections.Generic.IAsyncEnumerable source, int offset, TSource defaultLagValue, System.Func> resultSelector) -> System.Collections.Generic.IAsyncEnumerable static SuperLinq.Async.AsyncSuperEnumerable.Lag(this System.Collections.Generic.IAsyncEnumerable source, int offset, TSource defaultLagValue, System.Func resultSelector) -> System.Collections.Generic.IAsyncEnumerable static SuperLinq.Async.AsyncSuperEnumerable.Lag(this System.Collections.Generic.IAsyncEnumerable source, int offset) -> System.Collections.Generic.IAsyncEnumerable<(TSource current, TSource lag)> -static SuperLinq.Async.AsyncSuperEnumerable.LastIndexOf(this System.Collections.Generic.IAsyncEnumerable source, TSource item, System.Index index, int count, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask -static SuperLinq.Async.AsyncSuperEnumerable.LastIndexOf(this System.Collections.Generic.IAsyncEnumerable source, TSource item, System.Index index, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask static SuperLinq.Async.AsyncSuperEnumerable.LastIndexOf(this System.Collections.Generic.IAsyncEnumerable source, TSource item, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask static SuperLinq.Async.AsyncSuperEnumerable.Lead(this System.Collections.Generic.IAsyncEnumerable source, int offset, System.Func resultSelector) -> System.Collections.Generic.IAsyncEnumerable static SuperLinq.Async.AsyncSuperEnumerable.Lead(this System.Collections.Generic.IAsyncEnumerable source, int offset, TSource defaultLeadValue, System.Func> resultSelector) -> System.Collections.Generic.IAsyncEnumerable @@ -255,7 +244,6 @@ static SuperLinq.Async.AsyncSuperEnumerable.Repeat(TResult value) -> Sy static SuperLinq.Async.AsyncSuperEnumerable.Repeat(this System.Collections.Generic.IAsyncEnumerable source) -> System.Collections.Generic.IAsyncEnumerable static SuperLinq.Async.AsyncSuperEnumerable.Repeat(this System.Collections.Generic.IAsyncEnumerable source, int count) -> System.Collections.Generic.IAsyncEnumerable static SuperLinq.Async.AsyncSuperEnumerable.Replace(this System.Collections.Generic.IAsyncEnumerable source, int index, TSource value) -> System.Collections.Generic.IAsyncEnumerable -static SuperLinq.Async.AsyncSuperEnumerable.Replace(this System.Collections.Generic.IAsyncEnumerable source, System.Index index, TSource value) -> System.Collections.Generic.IAsyncEnumerable static SuperLinq.Async.AsyncSuperEnumerable.Retry(this System.Collections.Generic.IAsyncEnumerable source) -> System.Collections.Generic.IAsyncEnumerable static SuperLinq.Async.AsyncSuperEnumerable.Retry(this System.Collections.Generic.IAsyncEnumerable source, int count) -> System.Collections.Generic.IAsyncEnumerable static SuperLinq.Async.AsyncSuperEnumerable.Return(T item) -> System.Collections.Generic.IAsyncEnumerable @@ -315,7 +303,6 @@ static SuperLinq.Async.AsyncSuperEnumerable.StartsWith(this System.Collection static SuperLinq.Async.AsyncSuperEnumerable.StartsWith(this System.Collections.Generic.IAsyncEnumerable first, System.Collections.Generic.IEnumerable second, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.ValueTask static SuperLinq.Async.AsyncSuperEnumerable.TagFirstLast(this System.Collections.Generic.IAsyncEnumerable source, System.Func resultSelector) -> System.Collections.Generic.IAsyncEnumerable static SuperLinq.Async.AsyncSuperEnumerable.TagFirstLast(this System.Collections.Generic.IAsyncEnumerable source) -> System.Collections.Generic.IAsyncEnumerable<(TSource item, bool isFirst, bool isLast)> -static SuperLinq.Async.AsyncSuperEnumerable.Take(this System.Collections.Generic.IAsyncEnumerable source, System.Range range) -> System.Collections.Generic.IAsyncEnumerable static SuperLinq.Async.AsyncSuperEnumerable.TakeEvery(this System.Collections.Generic.IAsyncEnumerable source, int step) -> System.Collections.Generic.IAsyncEnumerable static SuperLinq.Async.AsyncSuperEnumerable.TakeUntil(this System.Collections.Generic.IAsyncEnumerable source, System.Func predicate) -> System.Collections.Generic.IAsyncEnumerable static SuperLinq.Async.AsyncSuperEnumerable.ThenBy(this System.Linq.IOrderedAsyncEnumerable source, System.Func keySelector, SuperLinq.OrderByDirection direction) -> System.Linq.IOrderedAsyncEnumerable diff --git a/Source/SuperLinq.Async/Replace.cs b/Source/SuperLinq.Async/Replace.cs index c9ad0c66..445d7c22 100644 --- a/Source/SuperLinq.Async/Replace.cs +++ b/Source/SuperLinq.Async/Replace.cs @@ -51,7 +51,11 @@ static async IAsyncEnumerable Core( /// /// This operator evaluates in a deferred and streaming manner. /// +#if NETCOREAPP public static IAsyncEnumerable Replace( +#else + internal static IAsyncEnumerable Replace( +#endif this IAsyncEnumerable source, Index index, TSource value) diff --git a/Source/SuperLinq.Async/SuperLinq.Async.csproj b/Source/SuperLinq.Async/SuperLinq.Async.csproj index cd0f9b9b..f113b306 100644 --- a/Source/SuperLinq.Async/SuperLinq.Async.csproj +++ b/Source/SuperLinq.Async/SuperLinq.Async.csproj @@ -121,10 +121,16 @@ - + + + + <_Parameter1>SuperLinq.Async.Test + + + true Generated diff --git a/Source/SuperLinq.Async/Take.cs b/Source/SuperLinq.Async/Take.cs index be0e9aa1..6119e135 100644 --- a/Source/SuperLinq.Async/Take.cs +++ b/Source/SuperLinq.Async/Take.cs @@ -12,7 +12,11 @@ public static partial class AsyncSuperEnumerable /// This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in Visual C# or `For Each` in Visual Basic. /// enumerates and yields elements whose indices belong to the specified . /// +#if NETCOREAPP public static IAsyncEnumerable Take(this IAsyncEnumerable source, Range range) +#else + internal static IAsyncEnumerable Take(this IAsyncEnumerable source, Range range) +#endif { ArgumentNullException.ThrowIfNull(source); diff --git a/Source/SuperLinq/ElementAt.cs b/Source/SuperLinq/ElementAt.cs index df2c9120..cc8d42ae 100644 --- a/Source/SuperLinq/ElementAt.cs +++ b/Source/SuperLinq/ElementAt.cs @@ -45,8 +45,10 @@ public static partial class SuperEnumerable #if NET6_0_OR_GREATER [Obsolete("This method has been implemented by the framework.")] public static TSource ElementAt(IEnumerable source, Index index) -#else +#elif NETCOREAPP public static TSource ElementAt(this IEnumerable source, Index index) +#else + internal static TSource ElementAt(this IEnumerable source, Index index) #endif { ArgumentNullException.ThrowIfNull(source); @@ -95,8 +97,10 @@ public static TSource ElementAt(this IEnumerable source, Index #if NET6_0_OR_GREATER [Obsolete("This method has been implemented by the framework.")] public static TSource? ElementAtOrDefault(IEnumerable source, Index index) -#else +#elif NETCOREAPP public static TSource? ElementAtOrDefault(this IEnumerable source, Index index) +#else + internal static TSource? ElementAtOrDefault(this IEnumerable source, Index index) #endif { ArgumentNullException.ThrowIfNull(source); diff --git a/Source/SuperLinq/Exclude.cs b/Source/SuperLinq/Exclude.cs index abb2fa48..f1c9aa22 100644 --- a/Source/SuperLinq/Exclude.cs +++ b/Source/SuperLinq/Exclude.cs @@ -68,7 +68,11 @@ public static IEnumerable Exclude(this IEnumerable sequence, int startI /// /// This method uses deferred execution and streams its results. /// +#if NETCOREAPP public static IEnumerable Exclude(this IEnumerable sequence, Range range) +#else + internal static IEnumerable Exclude(this IEnumerable sequence, Range range) +#endif { ArgumentNullException.ThrowIfNull(sequence); diff --git a/Source/SuperLinq/FindIndex.cs b/Source/SuperLinq/FindIndex.cs index 2ec725da..65f9a609 100644 --- a/Source/SuperLinq/FindIndex.cs +++ b/Source/SuperLinq/FindIndex.cs @@ -80,7 +80,11 @@ public static int FindIndex(this IEnumerable source, Func /// +#if NETCOREAPP public static int FindIndex(this IEnumerable source, Func predicate, Index index) +#else + internal static int FindIndex(this IEnumerable source, Func predicate, Index index) +#endif { return source.FindIndex(predicate, index, int.MaxValue); } @@ -130,7 +134,11 @@ public static int FindIndex(this IEnumerable source, Func /// +#if NETCOREAPP public static int FindIndex(this IEnumerable source, Func predicate, Index index, int count) +#else + internal static int FindIndex(this IEnumerable source, Func predicate, Index index, int count) +#endif { ArgumentNullException.ThrowIfNull(source); ArgumentNullException.ThrowIfNull(predicate); diff --git a/Source/SuperLinq/FindLastIndex.cs b/Source/SuperLinq/FindLastIndex.cs index 023daf8b..c53ba9c1 100644 --- a/Source/SuperLinq/FindLastIndex.cs +++ b/Source/SuperLinq/FindLastIndex.cs @@ -82,7 +82,11 @@ public static int FindLastIndex(this IEnumerable source, Func< /// This operator executes immediately. /// /// +#if NETCOREAPP public static int FindLastIndex(this IEnumerable source, Func predicate, Index index) +#else + internal static int FindLastIndex(this IEnumerable source, Func predicate, Index index) +#endif { return source.FindLastIndex(predicate, index, int.MaxValue); } @@ -135,7 +139,11 @@ public static int FindLastIndex(this IEnumerable source, Func< /// This operator executes immediately. /// /// +#if NETCOREAPP public static int FindLastIndex(this IEnumerable source, Func predicate, Index index, int count) +#else + internal static int FindLastIndex(this IEnumerable source, Func predicate, Index index, int count) +#endif { ArgumentNullException.ThrowIfNull(source); ArgumentNullException.ThrowIfNull(predicate); diff --git a/Source/SuperLinq/IndexOf.cs b/Source/SuperLinq/IndexOf.cs index 2ffca79c..b4da7ae0 100644 --- a/Source/SuperLinq/IndexOf.cs +++ b/Source/SuperLinq/IndexOf.cs @@ -79,7 +79,11 @@ public static int IndexOf(this IEnumerable source, TSource ite /// This operator executes immediately. /// /// +#if NETCOREAPP public static int IndexOf(this IEnumerable source, TSource item, Index index) +#else + internal static int IndexOf(this IEnumerable source, TSource item, Index index) +#endif { return source.IndexOf(item, index, int.MaxValue); } @@ -129,7 +133,11 @@ public static int IndexOf(this IEnumerable source, TSource ite /// This operator executes immediately. /// /// +#if NETCOREAPP public static int IndexOf(this IEnumerable source, TSource item, Index index, int count) +#else + internal static int IndexOf(this IEnumerable source, TSource item, Index index, int count) +#endif { return FindIndex(source, i => EqualityComparer.Default.Equals(i, item), index, count); } diff --git a/Source/SuperLinq/Insert.cs b/Source/SuperLinq/Insert.cs index 3a70eb7c..6e81324a 100644 --- a/Source/SuperLinq/Insert.cs +++ b/Source/SuperLinq/Insert.cs @@ -77,7 +77,11 @@ public static IEnumerable Insert(this IEnumerable first, IEnumerable /// This method uses deferred execution and streams its results. /// /// +#if NETCOREAPP public static IEnumerable Insert(this IEnumerable first, IEnumerable second, Index index) +#else + internal static IEnumerable Insert(this IEnumerable first, IEnumerable second, Index index) +#endif { ArgumentNullException.ThrowIfNull(first); ArgumentNullException.ThrowIfNull(second); diff --git a/Source/SuperLinq/LastIndexOf.cs b/Source/SuperLinq/LastIndexOf.cs index 9441a00a..6f119e07 100644 --- a/Source/SuperLinq/LastIndexOf.cs +++ b/Source/SuperLinq/LastIndexOf.cs @@ -80,7 +80,11 @@ public static int LastIndexOf(this IEnumerable source, TSource /// This operator executes immediately. /// /// +#if NETCOREAPP public static int LastIndexOf(this IEnumerable source, TSource item, Index index) +#else + internal static int LastIndexOf(this IEnumerable source, TSource item, Index index) +#endif { return source.LastIndexOf(item, index, int.MaxValue); } @@ -131,7 +135,11 @@ public static int LastIndexOf(this IEnumerable source, TSource /// This operator executes immediately. /// /// +#if NETCOREAPP public static int LastIndexOf(this IEnumerable source, TSource item, Index index, int count) +#else + internal static int LastIndexOf(this IEnumerable source, TSource item, Index index, int count) +#endif { return FindLastIndex(source, i => EqualityComparer.Default.Equals(i, item), index, count); } diff --git a/Source/SuperLinq/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt b/Source/SuperLinq/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt index 1360a35e..64903c8a 100644 --- a/Source/SuperLinq/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt +++ b/Source/SuperLinq/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt @@ -64,8 +64,6 @@ static SuperLinq.SuperEnumerable.Do(this System.Collections.Generic.IEn static SuperLinq.SuperEnumerable.Do(this System.Collections.Generic.IEnumerable source, System.Action onNext, System.Action onError, System.Action onCompleted) -> System.Collections.Generic.IEnumerable static SuperLinq.SuperEnumerable.DoWhile(this System.Collections.Generic.IEnumerable source, System.Func condition) -> System.Collections.Generic.IEnumerable static SuperLinq.SuperEnumerable.Duplicates(this System.Collections.Generic.IEnumerable source, System.Collections.Generic.IEqualityComparer comparer = null) -> System.Collections.Generic.IEnumerable -static SuperLinq.SuperEnumerable.ElementAt(this System.Collections.Generic.IEnumerable source, System.Index index) -> TSource -static SuperLinq.SuperEnumerable.ElementAtOrDefault(this System.Collections.Generic.IEnumerable source, System.Index index) -> TSource static SuperLinq.SuperEnumerable.EndsWith(this System.Collections.Generic.IEnumerable first, System.Collections.Generic.IEnumerable second) -> bool static SuperLinq.SuperEnumerable.EndsWith(this System.Collections.Generic.IEnumerable first, System.Collections.Generic.IEnumerable second, System.Collections.Generic.IEqualityComparer comparer) -> bool static SuperLinq.SuperEnumerable.Evaluate(this System.Collections.Generic.IEnumerable> functions) -> System.Collections.Generic.IEnumerable @@ -73,7 +71,6 @@ static SuperLinq.SuperEnumerable.Exactly(this System.Collections.Generic.IEnu static SuperLinq.SuperEnumerable.ExceptBy(this System.Collections.Generic.IEnumerable first, System.Collections.Generic.IEnumerable second, System.Func keySelector) -> System.Collections.Generic.IEnumerable static SuperLinq.SuperEnumerable.ExceptBy(this System.Collections.Generic.IEnumerable first, System.Collections.Generic.IEnumerable second, System.Func keySelector, System.Collections.Generic.IEqualityComparer keyComparer) -> System.Collections.Generic.IEnumerable static SuperLinq.SuperEnumerable.Exclude(this System.Collections.Generic.IEnumerable sequence, int startIndex, int count) -> System.Collections.Generic.IEnumerable -static SuperLinq.SuperEnumerable.Exclude(this System.Collections.Generic.IEnumerable sequence, System.Range range) -> System.Collections.Generic.IEnumerable static SuperLinq.SuperEnumerable.FallbackIfEmpty(this System.Collections.Generic.IEnumerable source, params T[] fallback) -> System.Collections.Generic.IEnumerable static SuperLinq.SuperEnumerable.FallbackIfEmpty(this System.Collections.Generic.IEnumerable source, System.Collections.Generic.IEnumerable fallback) -> System.Collections.Generic.IEnumerable static SuperLinq.SuperEnumerable.FillBackward(this System.Collections.Generic.IEnumerable source) -> System.Collections.Generic.IEnumerable @@ -84,11 +81,7 @@ static SuperLinq.SuperEnumerable.FillForward(this System.Collections.Generic. static SuperLinq.SuperEnumerable.FillForward(this System.Collections.Generic.IEnumerable source, System.Func predicate, System.Func fillSelector) -> System.Collections.Generic.IEnumerable static SuperLinq.SuperEnumerable.Finally(this System.Collections.Generic.IEnumerable source, System.Action finallyAction) -> System.Collections.Generic.IEnumerable static SuperLinq.SuperEnumerable.FindIndex(this System.Collections.Generic.IEnumerable source, System.Func predicate) -> int -static SuperLinq.SuperEnumerable.FindIndex(this System.Collections.Generic.IEnumerable source, System.Func predicate, System.Index index) -> int -static SuperLinq.SuperEnumerable.FindIndex(this System.Collections.Generic.IEnumerable source, System.Func predicate, System.Index index, int count) -> int static SuperLinq.SuperEnumerable.FindLastIndex(this System.Collections.Generic.IEnumerable source, System.Func predicate) -> int -static SuperLinq.SuperEnumerable.FindLastIndex(this System.Collections.Generic.IEnumerable source, System.Func predicate, System.Index index) -> int -static SuperLinq.SuperEnumerable.FindLastIndex(this System.Collections.Generic.IEnumerable source, System.Func predicate, System.Index index, int count) -> int static SuperLinq.SuperEnumerable.Flatten(this System.Collections.IEnumerable source) -> System.Collections.Generic.IEnumerable static SuperLinq.SuperEnumerable.Flatten(this System.Collections.IEnumerable source, System.Func selector) -> System.Collections.Generic.IEnumerable static SuperLinq.SuperEnumerable.Flatten(this System.Collections.IEnumerable source, System.Func predicate) -> System.Collections.Generic.IEnumerable @@ -143,8 +136,6 @@ static SuperLinq.SuperEnumerable.Index(this System.Collections.Generic. static SuperLinq.SuperEnumerable.IndexBy(this System.Collections.Generic.IEnumerable source, System.Func keySelector) -> System.Collections.Generic.IEnumerable<(int index, TSource item)> static SuperLinq.SuperEnumerable.IndexBy(this System.Collections.Generic.IEnumerable source, System.Func keySelector, System.Collections.Generic.IEqualityComparer comparer) -> System.Collections.Generic.IEnumerable<(int index, TSource item)> static SuperLinq.SuperEnumerable.IndexOf(this System.Collections.Generic.IEnumerable source, TSource item) -> int -static SuperLinq.SuperEnumerable.IndexOf(this System.Collections.Generic.IEnumerable source, TSource item, System.Index index) -> int -static SuperLinq.SuperEnumerable.IndexOf(this System.Collections.Generic.IEnumerable source, TSource item, System.Index index, int count) -> int static SuperLinq.SuperEnumerable.InnerHashJoin(this System.Collections.Generic.IEnumerable left, System.Collections.Generic.IEnumerable right, System.Func leftKeySelector, System.Func rightKeySelector, System.Func bothResultSelector, System.Collections.Generic.IEqualityComparer comparer = null) -> System.Collections.Generic.IEnumerable static SuperLinq.SuperEnumerable.InnerHashJoin(this System.Collections.Generic.IEnumerable left, System.Collections.Generic.IEnumerable right, System.Func leftKeySelector, System.Func rightKeySelector, System.Collections.Generic.IEqualityComparer comparer = null) -> System.Collections.Generic.IEnumerable<(TLeft Left, TRight Right)> static SuperLinq.SuperEnumerable.InnerLoopJoin(this System.Collections.Generic.IEnumerable left, System.Collections.Generic.IEnumerable right, System.Func leftKeySelector, System.Func rightKeySelector, System.Func bothResultSelector, System.Collections.Generic.IEqualityComparer comparer = null) -> System.Collections.Generic.IEnumerable @@ -152,15 +143,12 @@ static SuperLinq.SuperEnumerable.InnerLoopJoin(this System. static SuperLinq.SuperEnumerable.InnerMergeJoin(this System.Collections.Generic.IEnumerable left, System.Collections.Generic.IEnumerable right, System.Func leftKeySelector, System.Func rightKeySelector, System.Func bothResultSelector, System.Collections.Generic.IComparer comparer = null) -> System.Collections.Generic.IEnumerable static SuperLinq.SuperEnumerable.InnerMergeJoin(this System.Collections.Generic.IEnumerable left, System.Collections.Generic.IEnumerable right, System.Func leftKeySelector, System.Func rightKeySelector, System.Collections.Generic.IComparer comparer = null) -> System.Collections.Generic.IEnumerable<(TLeft Left, TRight Right)> static SuperLinq.SuperEnumerable.Insert(this System.Collections.Generic.IEnumerable first, System.Collections.Generic.IEnumerable second, int index) -> System.Collections.Generic.IEnumerable -static SuperLinq.SuperEnumerable.Insert(this System.Collections.Generic.IEnumerable first, System.Collections.Generic.IEnumerable second, System.Index index) -> System.Collections.Generic.IEnumerable static SuperLinq.SuperEnumerable.Interleave(this System.Collections.Generic.IEnumerable> sources) -> System.Collections.Generic.IEnumerable static SuperLinq.SuperEnumerable.Interleave(this System.Collections.Generic.IEnumerable source, params System.Collections.Generic.IEnumerable[] otherSources) -> System.Collections.Generic.IEnumerable static SuperLinq.SuperEnumerable.Lag(this System.Collections.Generic.IEnumerable source, int offset, System.Func resultSelector) -> System.Collections.Generic.IEnumerable static SuperLinq.SuperEnumerable.Lag(this System.Collections.Generic.IEnumerable source, int offset, TSource defaultLagValue, System.Func resultSelector) -> System.Collections.Generic.IEnumerable static SuperLinq.SuperEnumerable.Lag(this System.Collections.Generic.IEnumerable source, int offset) -> System.Collections.Generic.IEnumerable<(TSource current, TSource lag)> static SuperLinq.SuperEnumerable.LastIndexOf(this System.Collections.Generic.IEnumerable source, TSource item) -> int -static SuperLinq.SuperEnumerable.LastIndexOf(this System.Collections.Generic.IEnumerable source, TSource item, System.Index index) -> int -static SuperLinq.SuperEnumerable.LastIndexOf(this System.Collections.Generic.IEnumerable source, TSource item, System.Index index, int count) -> int static SuperLinq.SuperEnumerable.Lead(this System.Collections.Generic.IEnumerable source, int offset, System.Func resultSelector) -> System.Collections.Generic.IEnumerable static SuperLinq.SuperEnumerable.Lead(this System.Collections.Generic.IEnumerable source, int offset, TSource defaultLeadValue, System.Func resultSelector) -> System.Collections.Generic.IEnumerable static SuperLinq.SuperEnumerable.Lead(this System.Collections.Generic.IEnumerable source, int offset) -> System.Collections.Generic.IEnumerable<(TSource current, TSource lead)> @@ -232,7 +220,6 @@ static SuperLinq.SuperEnumerable.Repeat(TResult value) -> System.Collec static SuperLinq.SuperEnumerable.Repeat(this System.Collections.Generic.IEnumerable source) -> System.Collections.Generic.IEnumerable static SuperLinq.SuperEnumerable.Repeat(this System.Collections.Generic.IEnumerable source, int count) -> System.Collections.Generic.IEnumerable static SuperLinq.SuperEnumerable.Replace(this System.Collections.Generic.IEnumerable source, int index, TSource value) -> System.Collections.Generic.IEnumerable -static SuperLinq.SuperEnumerable.Replace(this System.Collections.Generic.IEnumerable source, System.Index index, TSource value) -> System.Collections.Generic.IEnumerable static SuperLinq.SuperEnumerable.Retry(this System.Collections.Generic.IEnumerable source) -> System.Collections.Generic.IEnumerable static SuperLinq.SuperEnumerable.Retry(this System.Collections.Generic.IEnumerable source, int count) -> System.Collections.Generic.IEnumerable static SuperLinq.SuperEnumerable.Return(T item) -> System.Collections.Generic.IEnumerable @@ -284,7 +271,6 @@ static SuperLinq.SuperEnumerable.Subsets(this System.Collections.Generic.IEnu static SuperLinq.SuperEnumerable.Subsets(this System.Collections.Generic.IEnumerable sequence, int subsetSize) -> System.Collections.Generic.IEnumerable> static SuperLinq.SuperEnumerable.TagFirstLast(this System.Collections.Generic.IEnumerable source, System.Func resultSelector) -> System.Collections.Generic.IEnumerable static SuperLinq.SuperEnumerable.TagFirstLast(this System.Collections.Generic.IEnumerable source) -> System.Collections.Generic.IEnumerable<(TSource item, bool isFirst, bool isLast)> -static SuperLinq.SuperEnumerable.Take(this System.Collections.Generic.IEnumerable source, System.Range range) -> System.Collections.Generic.IEnumerable static SuperLinq.SuperEnumerable.TakeEvery(this System.Collections.Generic.IEnumerable source, int step) -> System.Collections.Generic.IEnumerable static SuperLinq.SuperEnumerable.TakeUntil(this System.Collections.Generic.IEnumerable source, System.Func predicate) -> System.Collections.Generic.IEnumerable static SuperLinq.SuperEnumerable.ThenBy(this System.Linq.IOrderedEnumerable source, System.Func keySelector, SuperLinq.OrderByDirection direction) -> System.Linq.IOrderedEnumerable diff --git a/Source/SuperLinq/Replace.cs b/Source/SuperLinq/Replace.cs index f7da40bd..6f42ba35 100644 --- a/Source/SuperLinq/Replace.cs +++ b/Source/SuperLinq/Replace.cs @@ -75,10 +75,11 @@ static IEnumerable Core( /// /// This operator evaluates in a deferred and streaming manner. /// - public static IEnumerable Replace( - this IEnumerable source, - Index index, - TSource value) +#if NETCOREAPP + public static IEnumerable Replace(this IEnumerable source, Index index, TSource value) +#else + internal static IEnumerable Replace(this IEnumerable source, Index index, TSource value) +#endif { ArgumentNullException.ThrowIfNull(source); diff --git a/Source/SuperLinq/SuperLinq.csproj b/Source/SuperLinq/SuperLinq.csproj index 9733bdd5..92b413c2 100644 --- a/Source/SuperLinq/SuperLinq.csproj +++ b/Source/SuperLinq/SuperLinq.csproj @@ -6,7 +6,6 @@ SuperLinq SuperLinq - true true true @@ -164,6 +163,17 @@ + + + + + <_Parameter1>SuperLinq.Test + + + <_Parameter1>SuperLinq.Async.Test + + + true Generated diff --git a/Source/SuperLinq/Take.cs b/Source/SuperLinq/Take.cs index 378f896d..2e957f2b 100644 --- a/Source/SuperLinq/Take.cs +++ b/Source/SuperLinq/Take.cs @@ -33,10 +33,12 @@ public static partial class SuperEnumerable /// This method is implemented by using deferred execution. /// /// -#if !NET6_0_OR_GREATER +#if NET6_0_OR_GREATER + public static IEnumerable Take(IEnumerable source, Range range) +#elif NETCOREAPP public static IEnumerable Take(this IEnumerable source, Range range) #else - public static IEnumerable Take(IEnumerable source, Range range) + internal static IEnumerable Take(this IEnumerable source, Range range) #endif { ArgumentNullException.ThrowIfNull(source); diff --git a/Tests/SuperLinq.Async.Test/NullArgumentTest.cs b/Tests/SuperLinq.Async.Test/NullArgumentTest.cs index 2db904a9..4cf8322d 100644 --- a/Tests/SuperLinq.Async.Test/NullArgumentTest.cs +++ b/Tests/SuperLinq.Async.Test/NullArgumentTest.cs @@ -6,6 +6,7 @@ using System.Linq.Expressions; using System.Reflection; using CommunityToolkit.Diagnostics; +using Debug = System.Diagnostics.Debug; namespace Test.Async; diff --git a/Tests/SuperLinq.Async.Test/SuperLinq.Async.Test.csproj b/Tests/SuperLinq.Async.Test/SuperLinq.Async.Test.csproj index ef64d560..db107457 100644 --- a/Tests/SuperLinq.Async.Test/SuperLinq.Async.Test.csproj +++ b/Tests/SuperLinq.Async.Test/SuperLinq.Async.Test.csproj @@ -10,6 +10,7 @@ false latest-recommended + true @@ -29,6 +30,7 @@ + diff --git a/Tests/SuperLinq.Test/ExcludeTest.cs b/Tests/SuperLinq.Test/ExcludeTest.cs index 9321f256..d4f10995 100644 --- a/Tests/SuperLinq.Test/ExcludeTest.cs +++ b/Tests/SuperLinq.Test/ExcludeTest.cs @@ -199,6 +199,7 @@ public static IEnumerable GetExcludeRangeCases() => [^15..^3, false, true, new int[] { 7, 8, 9 }], ]; +#if NETCOREAPP [Theory] [MemberData(nameof(GetExcludeRangeCases))] [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "xUnit1026:Theory methods should use all of their parameters")] @@ -218,7 +219,9 @@ public void ExcludeRangeBehavior(Range range, bool shouldThrow, bool __, int[] e result.AssertSequenceEqual(expected); } +#endif +#if NETCOREAPP [Theory] [MemberData(nameof(GetExcludeRangeCases))] [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "xUnit1026:Theory methods should use all of their parameters")] @@ -238,4 +241,5 @@ public void ExcludeRangeCollectionBehavior(Range range, bool __, bool shouldThro result.AssertSequenceEqual(expected); } +#endif } diff --git a/Tests/SuperLinq.Test/InsertTest.cs b/Tests/SuperLinq.Test/InsertTest.cs index 3eea0f3b..175eb70f 100644 --- a/Tests/SuperLinq.Test/InsertTest.cs +++ b/Tests/SuperLinq.Test/InsertTest.cs @@ -77,6 +77,7 @@ public static IEnumerable GetInsertData() => _ => GetSequences(), (i, x) => new object[] { x[0], x[1], i }); +#if NETCOREAPP [Theory] [MemberData(nameof(GetInsertData))] public void Insert( @@ -97,6 +98,7 @@ public void Insert( testCollectionEnumerable: true); } } +#endif [Fact] public void InsertCollectionBehavior() diff --git a/Tests/SuperLinq.Test/NullArgumentTest.cs b/Tests/SuperLinq.Test/NullArgumentTest.cs index 06245d22..fba08991 100644 --- a/Tests/SuperLinq.Test/NullArgumentTest.cs +++ b/Tests/SuperLinq.Test/NullArgumentTest.cs @@ -6,6 +6,7 @@ using System.Linq.Expressions; using System.Reflection; using CommunityToolkit.Diagnostics; +using Debug = System.Diagnostics.Debug; namespace Test; diff --git a/Tests/SuperLinq.Test/SuperLinq.Test.csproj b/Tests/SuperLinq.Test/SuperLinq.Test.csproj index d5bf3bf2..1b1baead 100644 --- a/Tests/SuperLinq.Test/SuperLinq.Test.csproj +++ b/Tests/SuperLinq.Test/SuperLinq.Test.csproj @@ -2,20 +2,29 @@ - - SuperLinq.Test - SuperLinq.Test - Test - $(TargetFrameworks);net48 - - false - latest-recommended - + + SuperLinq.Test + SuperLinq.Test + Test + $(TargetFrameworks);net48 + + false + latest-recommended + true + + + + + + + + +