mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 14:10:53 +00:00
Misc
No point in making this available for all IEnumerables, only ICollections are affected
This commit is contained in:
@@ -56,11 +56,11 @@ public static class Utilities {
|
||||
private static readonly FrozenSet<char> DirectorySeparators = new HashSet<char>(2) { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar }.ToFrozenSet();
|
||||
|
||||
[PublicAPI]
|
||||
public static IEnumerable<T> AsLinqThreadSafeEnumerable<T>(this IEnumerable<T> enumerable) {
|
||||
ArgumentNullException.ThrowIfNull(enumerable);
|
||||
public static IEnumerable<T> AsLinqThreadSafeEnumerable<T>(this ICollection<T> collection) {
|
||||
ArgumentNullException.ThrowIfNull(collection);
|
||||
|
||||
// See: https://github.com/dotnet/runtime/discussions/50687
|
||||
return enumerable.Select(static entry => entry);
|
||||
return collection.Select(static entry => entry);
|
||||
}
|
||||
|
||||
[PublicAPI]
|
||||
|
||||
Reference in New Issue
Block a user