Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ public string Provide(string projectFile)
{
string provided = null;
var directory = new FileInfo(projectFile).Directory;
while(directory != null)
while (directory != null)
{
var isSolutionDirectory = directory.EnumerateFiles().Any(f => f.Name.EndsWith(".sln"));
var isSolutionDirectory = directory.EnumerateFiles().Any(IsSolutionFile);
if (isSolutionDirectory)
{
provided = directory.FullName;
Expand All @@ -23,5 +23,10 @@ public string Provide(string projectFile)
}
return provided;
}

private bool IsSolutionFile(FileInfo fileInfo)
{
return fileInfo.Name.EndsWith(".sln") || fileInfo.Name.EndsWith(".slnx");
}
}
}
Loading