Browse Source

Update ModuleAdder.cs

pull/1103/head
Halil ibrahim Kalkan 8 years ago
parent
commit
f41808496a
  1. 12
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectModification/ModuleAdder.cs

12
framework/src/Volo.Abp.Cli.Core/Volo/Abp/ProjectModification/ModuleAdder.cs

@ -55,13 +55,13 @@ namespace Volo.Abp.ProjectModification
private bool TryToFillProjectOrSolutionName(AddModuleArgs args) private bool TryToFillProjectOrSolutionName(AddModuleArgs args)
{ {
var projectFiles = FindFiles(Directory.GetCurrentDirectory(), ".csproj"); var projectFiles = FindFiles(Directory.GetCurrentDirectory(), ".csproj");
if (projectFiles.Count == 1) if (projectFiles.Length == 1)
{ {
args.ProjectFile = projectFiles.First(); args.ProjectFile = projectFiles.First();
return true; return true;
} }
if (projectFiles.Count > 1) if (projectFiles.Length > 1)
{ {
Logger.LogWarning( Logger.LogWarning(
"There are multiple project (.csproj) files in the current directory. Please specify one of the files below:"); "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"); var solutionFiles = FindFiles(Directory.GetCurrentDirectory(), ".sln");
if (solutionFiles.Count == 1) if (solutionFiles.Length == 1)
{ {
args.SolutionFile = solutionFiles.First(); args.SolutionFile = solutionFiles.First();
return true; return true;
} }
if (solutionFiles.Count > 1) if (solutionFiles.Length > 1)
{ {
Logger.LogWarning( Logger.LogWarning(
"There are multiple solution (.sln) files in the current directory. Please specify one of the files below:"); "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<string> FindFiles(string directory, string fileExtension) private string[] FindFiles(string directory, string fileExtension)
{ {
throw new NotImplementedException(); return Directory.GetFiles(directory, "*" + fileExtension);
} }
} }
} }

Loading…
Cancel
Save