mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Reduce Linq usage across entire project
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
#if NET40_OR_GREATER || NETCOREAPP
|
||||
using System.Threading.Tasks;
|
||||
@@ -68,9 +67,9 @@ namespace SabreTools.DatTools
|
||||
|
||||
// Get a list of all files to process
|
||||
#if NET20 || NET35
|
||||
List<string> files = Directory.GetFiles(basePath, "*").ToList();
|
||||
List<string> files = [.. Directory.GetFiles(basePath, "*")];
|
||||
#else
|
||||
List<string> files = Directory.EnumerateFiles(basePath, "*", SearchOption.AllDirectories).ToList();
|
||||
List<string> files = [.. Directory.EnumerateFiles(basePath, "*", SearchOption.AllDirectories)];
|
||||
#endif
|
||||
|
||||
// Loop through and add the file sizes
|
||||
|
||||
Reference in New Issue
Block a user