fix: Adds Combine overloads (#989)
This commit is contained in:
parent
943b2eca36
commit
0d9259e4cd
1 changed files with 9 additions and 1 deletions
|
|
@ -1556,7 +1556,15 @@ namespace Server
|
||||||
}
|
}
|
||||||
|
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public static T[] Combine<T>(this IList<T> source, bool pooled = false, params IList<T>[] arrays)
|
public static T[] Combine<T>(this IList<T> source, params IList<T>[] arrays) =>
|
||||||
|
source.Combine(false, arrays);
|
||||||
|
|
||||||
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
|
public static T[] CombinePooled<T>(this IList<T> source, params IList<T>[] arrays) =>
|
||||||
|
source.Combine(true, arrays);
|
||||||
|
|
||||||
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
|
public static T[] Combine<T>(this IList<T> source, bool pooled, params IList<T>[] arrays)
|
||||||
{
|
{
|
||||||
var totalLength = source.Count;
|
var totalLength = source.Count;
|
||||||
foreach (var arr in arrays)
|
foreach (var arr in arrays)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue