@@ -53,17 +53,15 @@ public ActionResult Submit(string githubUrl)
53
53
return View ( "Index" ) ;
54
54
}
55
55
56
- // Generate the source browser files for this solution
57
- var solutionPaths = GetSolutionPaths ( repoRootPath ) ;
58
- if ( solutionPaths . Length == 0 )
59
- {
60
- ViewBag . Error = "No C# solution was found. Ensure that a valid .sln file exists within your repository." ;
61
- return View ( "Index" ) ;
62
- }
63
-
64
56
var organizationPath = System . Web . Hosting . HostingEnvironment . MapPath ( "~/" ) + "SB_Files\\ " + retriever . UserName ;
65
57
var repoPath = Path . Combine ( organizationPath , retriever . RepoName ) ;
66
58
59
+
60
+ // Generate the source browser files for this solution
61
+ var solutionPaths = Directory . GetFiles ( repoRootPath , "*.sln" , SearchOption . AllDirectories ) ;
62
+ var omnisharpPaths = Directory . GetFiles ( repoRootPath , "omnisharp.json" , SearchOption . AllDirectories ) ;
63
+ var projectJsonPaths = Directory . GetFiles ( repoRootPath , "project.json" , SearchOption . AllDirectories ) ;
64
+
67
65
// TODO: Use parallel for.
68
66
// TODO: Process all solutions.
69
67
// For now, we're assuming the shallowest and shortest .sln file is the one we're interested in
@@ -121,19 +119,5 @@ public ActionResult Submit(string githubUrl)
121
119
}
122
120
}
123
121
}
124
-
125
- /// <summary>
126
- /// Simply searches for the solution files and returns their paths.
127
- /// </summary>
128
- /// <param name="rootDirectory">
129
- /// The root Directory.
130
- /// </param>
131
- /// <returns>
132
- /// The solution paths.
133
- /// </returns>
134
- private string [ ] GetSolutionPaths ( string rootDirectory )
135
- {
136
- return Directory . GetFiles ( rootDirectory , "*.sln" , SearchOption . AllDirectories ) ;
137
- }
138
122
}
139
123
}
0 commit comments