Skip to content

Commit

Permalink
tweaks for Dustin :)
Browse files Browse the repository at this point in the history
  • Loading branch information
filipw committed Apr 19, 2017
1 parent a82fa19 commit 9cb35de
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions src/OmniSharp.Roslyn/MetadataHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ public string GetFilePathForSymbol(Project project, ISymbol symbol)

// since submission projects cannot have new documents added to it
// we will use temporary project to hold metadata documents
var metadataProject = project.IsSubmission ? project.Solution.AddProject("metadataTemp", "metadataTemp.dll", LanguageNames.CSharp).
WithCompilationOptions(project.CompilationOptions).
WithMetadataReferences(project.MetadataReferences) : project;
var metadataProject = project.IsSubmission
? project.Solution.AddProject("metadataTemp", "metadataTemp.dll", LanguageNames.CSharp)
.WithCompilationOptions(project.CompilationOptions)
.WithMetadataReferences(project.MetadataReferences)
: project;

var temporaryDocument = metadataProject.AddDocument(filePath, string.Empty);
var service = _csharpMetadataAsSourceService.CreateInstance(temporaryDocument.Project.LanguageServices);
Expand Down
4 changes: 2 additions & 2 deletions tests/TestUtility/OmniSharpTestHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ public void AddFilesToWorkspace(params TestFile[] testFiles)
this.Workspace,
"project.json",
new[] { "dnx451", "dnxcore50" },
testFiles.Where(f => f.FileName.EndsWith(".cs", StringComparison.CurrentCultureIgnoreCase)).ToArray());
testFiles.Where(f => f.FileName.EndsWith(".cs", StringComparison.OrdinalIgnoreCase)).ToArray());

foreach (var csxFile in testFiles.Where(f => f.FileName.EndsWith(".csx", StringComparison.CurrentCultureIgnoreCase)))
foreach (var csxFile in testFiles.Where(f => f.FileName.EndsWith(".csx", StringComparison.OrdinalIgnoreCase)))
{
TestHelpers.AddCsxProjectToWorkspace(Workspace, csxFile);
}
Expand Down

0 comments on commit 9cb35de

Please sign in to comment.