From 567a00043b15a7996a7678b1422ccf700bb09753 Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Mon, 22 Apr 2019 17:31:01 -0400 Subject: [PATCH 1/2] Remove "recursive" from comment Fixes #11744 The algorithm isn't really "recursive" because the `GetDirectories` will return all sub-directories, at any level from teh current directory. Therefore, the later calls to `Search` all search only for files. Update the comment to better reflect that. --- csharp/events/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csharp/events/Program.cs b/csharp/events/Program.cs index a5cc3ddb071..aa3ef88d8d7 100644 --- a/csharp/events/Program.cs +++ b/csharp/events/Program.cs @@ -96,7 +96,7 @@ public void Search(string directory, string searchPattern, bool searchSubDirs = { directoryChanged?.Invoke(this, new SearchDirectoryArgs(dir, totalDirs, completedDirs++)); - // Recursively search this child directory: + // Search each sub-directory for files that match the search pattern: SearchDirectory(dir, searchPattern); } // Include the Current Directory: From b2e9fccea9a4832df2a61f389f9d316419241837 Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Thu, 25 Apr 2019 12:17:50 -0400 Subject: [PATCH 2/2] respond to code review --- csharp/events/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csharp/events/Program.cs b/csharp/events/Program.cs index aa3ef88d8d7..aa543053885 100644 --- a/csharp/events/Program.cs +++ b/csharp/events/Program.cs @@ -96,7 +96,7 @@ public void Search(string directory, string searchPattern, bool searchSubDirs = { directoryChanged?.Invoke(this, new SearchDirectoryArgs(dir, totalDirs, completedDirs++)); - // Search each sub-directory for files that match the search pattern: + // Search 'dir' and its subdirectories for files that match the search pattern: SearchDirectory(dir, searchPattern); } // Include the Current Directory: