-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Provide overloads to avoid unnecessary boxing #71894
Conversation
src/Compilers/Core/Portable/Collections/ImmutableArrayExtensions.cs
Outdated
Show resolved
Hide resolved
src/Compilers/Core/Portable/Collections/ImmutableArrayExtensions.cs
Outdated
Show resolved
Hide resolved
da8c785
to
5f8e721
Compare
/// <param name="predicate">The condition to use for filtering the array content.</param> | ||
/// <param name="selector">A transform function to apply to each element that is not filtered out by <paramref name="predicate"/>.</param> | ||
/// <returns>If the items's length is 0, this will return an empty immutable array.</returns> | ||
public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, bool> predicate, Func<TItem, ImmutableArray<TResult>> selector) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 There were two callers of the previous overload prior to this change. After this change, there is one caller of the previous overload, and one caller of the new overload.
/// <param name="array">The array to transform</param> | ||
/// <param name="selector">A transform function to apply to each element.</param> | ||
/// <returns>If the array's length is 0, this will return an empty immutable array.</returns> | ||
public static ImmutableArray<TResult> SelectManyAsArray<TItem, TResult>(this ImmutableArray<TItem> array, Func<TItem, ImmutableArray<TResult>> selector) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 There were 16 callers of the previous overload prior to this change. After this change, there are 3 callers of the previous overload, and 13 callers of the new overload.
No description provided.