Moved more to Map library

This commit is contained in:
2022-08-29 08:45:01 -07:00
parent 674555b4fc
commit c1d30b5bbc
46 changed files with 1631 additions and 697 deletions

View File

@ -571,7 +571,7 @@ public class A_Property
ProgressBarOptions options = new() { ProgressCharacter = '─', ProgressBarOnBottom = true, DisableBottomPercentage = true };
string message = $"{container.R:000}.{container.G} / {containersCount:000}) {filteredItems.Length:000} file(s) - {totalSeconds} total second(s) - {container.SourceDirectory}";
using ProgressBar progressBar = new(filteredItems.Length, message, options);
_ = Parallel.For(0, filteredItems.Length, parallelOptions, i =>
_ = Parallel.For(0, filteredItems.Length, parallelOptions, (i, state) =>
{
try
{

View File

@ -140,7 +140,7 @@ public class Container
List<(int, string, List<(string, Shared.Models.Property?)>, int)> results = new();
int length = rootDirectory.Length;
ParallelOptions parallelOptions = new() { MaxDegreeOfParallelism = Environment.ProcessorCount };
_ = Parallel.For(0, jsonCollection.Count, parallelOptions, i => ParallelFor(jsonCollection, i, length, results));
_ = Parallel.For(0, jsonCollection.Count, parallelOptions, (i, state) => ParallelFor(jsonCollection, i, length, results));
return results;
}