Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Take to properly be escaped #581

Merged
merged 2 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Source/SuperLinq/PublicAPI/net6.0/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#nullable enable
static SuperLinq.SuperEnumerable.AggregateBy<TSource, TKey, TAccumulate>(this System.Collections.Generic.IEnumerable<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.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TAccumulate>>!
static SuperLinq.SuperEnumerable.AggregateBy<TSource, TKey, TAccumulate>(this System.Collections.Generic.IEnumerable<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.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TAccumulate>>!
*REMOVED*static SuperLinq.SuperEnumerable.Publish<TSource, TResult>(this System.Collections.Generic.IEnumerable<TSource>! source, System.Func<System.Collections.Generic.IEnumerable<TSource>!, System.Collections.Generic.IEnumerable<TResult>!>! selector) -> System.Collections.Generic.IEnumerable<TResult>!
*REMOVED*static SuperLinq.SuperEnumerable.Share<TSource, TResult>(this System.Collections.Generic.IEnumerable<TSource>! source, System.Func<System.Collections.Generic.IEnumerable<TSource>!, System.Collections.Generic.IEnumerable<TResult>!>! selector) -> System.Collections.Generic.IEnumerable<TResult>!
static SuperLinq.SuperEnumerable.AggregateBy<TSource, TKey, TAccumulate>(this System.Collections.Generic.IEnumerable<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.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TAccumulate>>!
static SuperLinq.SuperEnumerable.AggregateBy<TSource, TKey, TAccumulate>(this System.Collections.Generic.IEnumerable<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.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TAccumulate>>!
static SuperLinq.SuperEnumerable.Take<TSource>(System.Collections.Generic.IEnumerable<TSource>! source, System.Range range) -> System.Collections.Generic.IEnumerable<TSource>!
5 changes: 3 additions & 2 deletions Source/SuperLinq/PublicAPI/net7.0/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#nullable enable
static SuperLinq.SuperEnumerable.AggregateBy<TSource, TKey, TAccumulate>(this System.Collections.Generic.IEnumerable<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.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TAccumulate>>!
static SuperLinq.SuperEnumerable.AggregateBy<TSource, TKey, TAccumulate>(this System.Collections.Generic.IEnumerable<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.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TAccumulate>>!
*REMOVED*static SuperLinq.SuperEnumerable.Publish<TSource, TResult>(this System.Collections.Generic.IEnumerable<TSource>! source, System.Func<System.Collections.Generic.IEnumerable<TSource>!, System.Collections.Generic.IEnumerable<TResult>!>! selector) -> System.Collections.Generic.IEnumerable<TResult>!
*REMOVED*static SuperLinq.SuperEnumerable.Share<TSource, TResult>(this System.Collections.Generic.IEnumerable<TSource>! source, System.Func<System.Collections.Generic.IEnumerable<TSource>!, System.Collections.Generic.IEnumerable<TResult>!>! selector) -> System.Collections.Generic.IEnumerable<TResult>!
static SuperLinq.SuperEnumerable.AggregateBy<TSource, TKey, TAccumulate>(this System.Collections.Generic.IEnumerable<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.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TAccumulate>>!
static SuperLinq.SuperEnumerable.AggregateBy<TSource, TKey, TAccumulate>(this System.Collections.Generic.IEnumerable<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.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TAccumulate>>!
static SuperLinq.SuperEnumerable.Take<TSource>(System.Collections.Generic.IEnumerable<TSource>! source, System.Range range) -> System.Collections.Generic.IEnumerable<TSource>!
5 changes: 3 additions & 2 deletions Source/SuperLinq/PublicAPI/net8.0/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#nullable enable
static SuperLinq.SuperEnumerable.AggregateBy<TSource, TKey, TAccumulate>(this System.Collections.Generic.IEnumerable<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.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TAccumulate>>!
static SuperLinq.SuperEnumerable.AggregateBy<TSource, TKey, TAccumulate>(this System.Collections.Generic.IEnumerable<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.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TAccumulate>>!
*REMOVED*static SuperLinq.SuperEnumerable.Publish<TSource, TResult>(this System.Collections.Generic.IEnumerable<TSource>! source, System.Func<System.Collections.Generic.IEnumerable<TSource>!, System.Collections.Generic.IEnumerable<TResult>!>! selector) -> System.Collections.Generic.IEnumerable<TResult>!
*REMOVED*static SuperLinq.SuperEnumerable.Share<TSource, TResult>(this System.Collections.Generic.IEnumerable<TSource>! source, System.Func<System.Collections.Generic.IEnumerable<TSource>!, System.Collections.Generic.IEnumerable<TResult>!>! selector) -> System.Collections.Generic.IEnumerable<TResult>!
static SuperLinq.SuperEnumerable.AggregateBy<TSource, TKey, TAccumulate>(this System.Collections.Generic.IEnumerable<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.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TAccumulate>>!
static SuperLinq.SuperEnumerable.AggregateBy<TSource, TKey, TAccumulate>(this System.Collections.Generic.IEnumerable<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.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TAccumulate>>!
static SuperLinq.SuperEnumerable.Take<TSource>(System.Collections.Generic.IEnumerable<TSource>! source, System.Range range) -> System.Collections.Generic.IEnumerable<TSource>!
6 changes: 4 additions & 2 deletions Source/SuperLinq/Take.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ namespace SuperLinq;

public static partial class SuperEnumerable
{
#if !NET6_0_OR_GREATER
/// <summary>
/// Returns a specified range of contiguous elements from a sequence.
/// </summary>
Expand Down Expand Up @@ -34,7 +33,11 @@ public static partial class SuperEnumerable
/// This method is implemented by using deferred execution.
/// </para>
/// </remarks>
#if !NET6_0_OR_GREATER
public static IEnumerable<TSource> Take<TSource>(this IEnumerable<TSource> source, Range range)
#else
public static IEnumerable<TSource> Take<TSource>(IEnumerable<TSource> source, Range range)
#endif
{
ArgumentNullException.ThrowIfNull(source);

Expand Down Expand Up @@ -164,5 +167,4 @@ private static IEnumerable<TSource> TakeRangeFromEndIterator<TSource>(IEnumerabl
}
}
}
#endif
}