Skip to content

Commit

Permalink
Merge pull request #242 from OmniSharp/fix230
Browse files Browse the repository at this point in the history
filter sources message by ending and only allow .cs files
  • Loading branch information
nosami committed Jun 18, 2015
2 parents 0abd5fb + eeda8e0 commit 4128dd5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/OmniSharp/AspNet5/AspNet5ProjectSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -333,14 +333,16 @@ public void Initalize()
// The sources to feed to the language service
var val = m.Payload.ToObject<SourcesMessage>();
project.SourceFiles = val.Files;
project.SourceFiles = val.Files
.Where(fileName => Path.GetExtension(fileName) == ".cs")
.ToList();
var frameworkProject = project.ProjectsByFramework[val.Framework.FrameworkName];
var projectId = frameworkProject.ProjectId;
var unprocessed = new HashSet<string>(frameworkProject.Documents.Keys);
foreach (var file in val.Files)
foreach (var file in project.SourceFiles)
{
if (unprocessed.Remove(file))
{
Expand Down

0 comments on commit 4128dd5

Please sign in to comment.