From 8d6a92f0aca295f34de6afa2f0056105b71d4cbd Mon Sep 17 00:00:00 2001 From: Daniel-iel Date: Sun, 19 May 2024 09:37:22 -0300 Subject: [PATCH] para teste --- src/ByReplace/Analyzers/Analyzer.cs | 5 ++++- src/ByReplace/Mappers/DirectoryThree.cs | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ByReplace/Analyzers/Analyzer.cs b/src/ByReplace/Analyzers/Analyzer.cs index 12e794c..c857d5c 100644 --- a/src/ByReplace/Analyzers/Analyzer.cs +++ b/src/ByReplace/Analyzers/Analyzer.cs @@ -20,6 +20,9 @@ internal ImmutableList LoadThreeFiles() DirectoryThree directoryThree = new DirectoryThree(print); directoryThree.MapThreeSources(brConfiguration.Path); - return directoryThree.Nodes.ToImmutableList(); + return directoryThree + .Nodes + .OrderBy(c => c.Directory) + .ToImmutableList(); } } diff --git a/src/ByReplace/Mappers/DirectoryThree.cs b/src/ByReplace/Mappers/DirectoryThree.cs index b7ddfdf..a62350c 100644 --- a/src/ByReplace/Mappers/DirectoryThree.cs +++ b/src/ByReplace/Mappers/DirectoryThree.cs @@ -24,7 +24,9 @@ public ImmutableList MapThreeSources(string path) MapThreeSubFolders(path, ref nodes); - Nodes = nodes.ToImmutableList(); + Nodes = nodes + .OrderBy(c => c.Directory) + .ToImmutableList(); return Nodes; } @@ -40,6 +42,7 @@ private void MapThreeSubFolders(string dir, ref List nodes) Files: directoryInfo .GetFiles() .Select(file => new FileMapper(Guid.NewGuid(), file.Name, file.FullName, file.Extension)) + .OrderBy(file => file.Name) .ToImmutableList() );