|
|
|
@ -14,7 +14,7 @@ namespace ICSharpCode.Decompiler.Util
@@ -14,7 +14,7 @@ namespace ICSharpCode.Decompiler.Util
|
|
|
|
|
value = pair.Value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#if !NETCORE
|
|
|
|
|
#if !NET8_0_OR_GREATER
|
|
|
|
|
public static IEnumerable<(A, B)> Zip<A, B>(this IEnumerable<A> input1, IEnumerable<B> input2) |
|
|
|
|
{ |
|
|
|
|
return input1.Zip(input2, (a, b) => (a, b)); |
|
|
|
@ -66,7 +66,7 @@ namespace ICSharpCode.Decompiler.Util
@@ -66,7 +66,7 @@ namespace ICSharpCode.Decompiler.Util
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#if !NETCORE
|
|
|
|
|
#if !NET8_0_OR_GREATER
|
|
|
|
|
public static HashSet<T> ToHashSet<T>(this IEnumerable<T> input) |
|
|
|
|
{ |
|
|
|
|
return new HashSet<T>(input); |
|
|
|
@ -312,6 +312,8 @@ namespace ICSharpCode.Decompiler.Util
@@ -312,6 +312,8 @@ namespace ICSharpCode.Decompiler.Util
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if !NET8_0_OR_GREATER
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Returns the maximum element.
|
|
|
|
|
/// </summary>
|
|
|
|
@ -320,7 +322,7 @@ namespace ICSharpCode.Decompiler.Util
@@ -320,7 +322,7 @@ namespace ICSharpCode.Decompiler.Util
|
|
|
|
|
{ |
|
|
|
|
return source.MaxBy(keySelector, Comparer<K>.Default); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Returns the maximum element.
|
|
|
|
|
/// </summary>
|
|
|
|
@ -377,7 +379,7 @@ namespace ICSharpCode.Decompiler.Util
@@ -377,7 +379,7 @@ namespace ICSharpCode.Decompiler.Util
|
|
|
|
|
return first; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#if !NETCORE
|
|
|
|
|
#if !NET8_0_OR_GREATER
|
|
|
|
|
public static int EnsureCapacity<T>(this List<T> list, int capacity) |
|
|
|
|
{ |
|
|
|
|
if (capacity < 0) |
|
|
|
|