From f41808496a347594d1f0dfc946c902781627d671 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Mon, 6 May 2019 18:12:26 +0300 Subject: [PATCH] Update ModuleAdder.cs --- .../Volo/Abp/ProjectModification/ModuleAdder.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectModification/ModuleAdder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectModification/ModuleAdder.cs index 6b5017f882..b0e5f2a353 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectModification/ModuleAdder.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectModification/ModuleAdder.cs @@ -55,13 +55,13 @@ namespace Volo.Abp.ProjectModification private bool TryToFillProjectOrSolutionName(AddModuleArgs args) { var projectFiles = FindFiles(Directory.GetCurrentDirectory(), ".csproj"); - if (projectFiles.Count == 1) + if (projectFiles.Length == 1) { args.ProjectFile = projectFiles.First(); return true; } - if (projectFiles.Count > 1) + if (projectFiles.Length > 1) { Logger.LogWarning( "There are multiple project (.csproj) files in the current directory. Please specify one of the files below:"); @@ -76,13 +76,13 @@ namespace Volo.Abp.ProjectModification } var solutionFiles = FindFiles(Directory.GetCurrentDirectory(), ".sln"); - if (solutionFiles.Count == 1) + if (solutionFiles.Length == 1) { args.SolutionFile = solutionFiles.First(); return true; } - if (solutionFiles.Count > 1) + if (solutionFiles.Length > 1) { Logger.LogWarning( "There are multiple solution (.sln) files in the current directory. Please specify one of the files below:"); @@ -129,9 +129,9 @@ namespace Volo.Abp.ProjectModification } - private List FindFiles(string directory, string fileExtension) + private string[] FindFiles(string directory, string fileExtension) { - throw new NotImplementedException(); + return Directory.GetFiles(directory, "*" + fileExtension); } } }