Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into update-build-tools
- Loading branch information
Showing
26 changed files
with
260 additions
and
100 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,24 @@ | ||
using System.Runtime.CompilerServices; | ||
using OmniSharp; | ||
|
||
[assembly: InternalsVisibleTo("OmniSharp")] | ||
[assembly: InternalsVisibleTo("OmniSharp.Host")] | ||
[assembly: InternalsVisibleTo("OmniSharp.MSBuild")] | ||
[assembly: InternalsVisibleTo("OmniSharp.Roslyn")] | ||
[assembly: InternalsVisibleTo("OmniSharp.Roslyn.CSharp")] | ||
[assembly: InternalsVisibleTo("OmniSharp.DotNetTest.Tests")] | ||
[assembly: InternalsVisibleTo("OmniSharp.Tests")] | ||
[assembly: InternalsVisibleTo("OmniSharp.LanguageServerProtocol")] | ||
[assembly: InternalsVisibleTo("OmniSharp" + OmniSharpPublicKey.Key)] | ||
[assembly: InternalsVisibleTo("OmniSharp.Host" + OmniSharpPublicKey.Key)] | ||
[assembly: InternalsVisibleTo("OmniSharp.MSBuild" + OmniSharpPublicKey.Key)] | ||
[assembly: InternalsVisibleTo("OmniSharp.Roslyn" + OmniSharpPublicKey.Key)] | ||
[assembly: InternalsVisibleTo("OmniSharp.Roslyn.CSharp" + OmniSharpPublicKey.Key)] | ||
[assembly: InternalsVisibleTo("OmniSharp.DotNetTest.Tests" + OmniSharpPublicKey.Key)] | ||
[assembly: InternalsVisibleTo("OmniSharp.Tests" + OmniSharpPublicKey.Key)] | ||
[assembly: InternalsVisibleTo("OmniSharp.LanguageServerProtocol" + OmniSharpPublicKey.Key)] | ||
|
||
|
||
namespace OmniSharp | ||
{ | ||
public class OmniSharpPublicKey | ||
{ | ||
public const string Key = ", PublicKey=" + "0024000004800000940000000602000000240000525341310004000001000100917302efc152e6" + | ||
"464679d4625bd9989e12d4662a9eaadf284d04992881c0e7b16e756e63ef200a02c4054d4d31e2" + | ||
"1b9aa0b0b873bcefca8cd42ec583a3db509665c9b22318ceceec581663fc07e2422bb2135539ba" + | ||
"8a517c209ac175fff07c5af10cef636e04cae91d28f51fcde5d14c1a9bfed06e096cf977fd0d60" + | ||
"002a3ea6"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
using System.Runtime.CompilerServices; | ||
using OmniSharp; | ||
using System.Runtime.CompilerServices; | ||
|
||
[assembly: InternalsVisibleTo("OmniSharp.Cake.Tests")] | ||
[assembly: InternalsVisibleTo("OmniSharp.Cake.Tests" + OmniSharpPublicKey.Key)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,4 @@ | |
<PackageReference Include="Cake.Scripting.Transport" /> | ||
</ItemGroup> | ||
|
||
</Project> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
using System.Runtime.CompilerServices; | ||
using OmniSharp; | ||
using System.Runtime.CompilerServices; | ||
|
||
[assembly: InternalsVisibleTo("OmniSharp.DotNetTest.Tests")] | ||
[assembly: InternalsVisibleTo("OmniSharp.DotNetTest.Tests" + OmniSharpPublicKey.Key)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
using System.Runtime.CompilerServices; | ||
using OmniSharp; | ||
using System.Runtime.CompilerServices; | ||
|
||
[assembly: InternalsVisibleTo("OmniSharp.Http.Tests")] | ||
[assembly: InternalsVisibleTo("OmniSharp.MSBuild.Tests")] | ||
[assembly: InternalsVisibleTo("OmniSharp.Roslyn.CSharp.Tests")] | ||
[assembly: InternalsVisibleTo("OmniSharp.Stdio.Tests")] | ||
[assembly: InternalsVisibleTo("TestUtility")] | ||
[assembly: InternalsVisibleTo("OmniSharp.Http.Tests" + OmniSharpPublicKey.Key)] | ||
[assembly: InternalsVisibleTo("OmniSharp.MSBuild.Tests" + OmniSharpPublicKey.Key)] | ||
[assembly: InternalsVisibleTo("OmniSharp.Roslyn.CSharp.Tests" + OmniSharpPublicKey.Key)] | ||
[assembly: InternalsVisibleTo("OmniSharp.Stdio.Tests" + OmniSharpPublicKey.Key)] | ||
[assembly: InternalsVisibleTo("TestUtility" + OmniSharpPublicKey.Key)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,55 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Microsoft.Extensions.Configuration; | ||
using Microsoft.Extensions.FileProviders; | ||
using OmniSharp.Internal; | ||
using OmniSharp.Utilities; | ||
|
||
namespace OmniSharp | ||
{ | ||
public class ConfigurationBuilder : IConfigurationBuilder | ||
public class ConfigurationBuilder | ||
{ | ||
private readonly IOmniSharpEnvironment _environment; | ||
private readonly IConfigurationBuilder _builder; | ||
|
||
public ConfigurationBuilder(IOmniSharpEnvironment environment) | ||
{ | ||
_environment = environment; | ||
_builder = new Microsoft.Extensions.Configuration.ConfigurationBuilder() | ||
.SetBasePath(AppContext.BaseDirectory); | ||
} | ||
|
||
public IConfigurationBuilder Add(IConfigurationSource source) | ||
public ConfigurationResult Build(Action<IConfigurationBuilder> additionalSetup = null) | ||
{ | ||
_builder.Add(source); | ||
return this; | ||
} | ||
|
||
public IConfigurationRoot Build() | ||
{ | ||
var configBuilder = new Microsoft.Extensions.Configuration.ConfigurationBuilder() | ||
.SetBasePath(AppContext.BaseDirectory) | ||
.AddEnvironmentVariables("OMNISHARP_"); | ||
|
||
if (_environment.AdditionalArguments?.Length > 0) | ||
try | ||
{ | ||
configBuilder.AddCommandLine(_environment.AdditionalArguments); | ||
var configBuilder = new Microsoft.Extensions.Configuration.ConfigurationBuilder() | ||
.SetBasePath(AppContext.BaseDirectory) | ||
.AddEnvironmentVariables("OMNISHARP_"); | ||
|
||
if (_environment.AdditionalArguments?.Length > 0) | ||
{ | ||
configBuilder.AddCommandLine(_environment.AdditionalArguments); | ||
} | ||
|
||
// Use the global omnisharp config if there's any in the shared path | ||
configBuilder.CreateAndAddGlobalOptionsFile(_environment); | ||
|
||
// Use the local omnisharp config if there's any in the root path | ||
configBuilder.AddJsonFile( | ||
new PhysicalFileProvider(_environment.TargetDirectory).WrapForPolling(), | ||
Constants.OptionsFile, | ||
optional: true, | ||
reloadOnChange: true); | ||
|
||
// bootstrap additional host configuration at the end | ||
additionalSetup?.Invoke(configBuilder); | ||
|
||
var config = configBuilder.Build(); | ||
return new ConfigurationResult(config); | ||
} | ||
catch (Exception ex) | ||
{ | ||
return new ConfigurationResult(ex); | ||
} | ||
|
||
// Use the global omnisharp config if there's any in the shared path | ||
configBuilder.CreateAndAddGlobalOptionsFile(_environment); | ||
|
||
// Use the local omnisharp config if there's any in the root path | ||
configBuilder.AddJsonFile( | ||
new PhysicalFileProvider(_environment.TargetDirectory).WrapForPolling(), | ||
Constants.OptionsFile, | ||
optional: true, | ||
reloadOnChange: true); | ||
|
||
return configBuilder.Build(); | ||
} | ||
|
||
public IDictionary<string, object> Properties => _builder.Properties; | ||
public IList<IConfigurationSource> Sources => _builder.Sources; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using Microsoft.Extensions.Configuration; | ||
|
||
namespace OmniSharp | ||
{ | ||
public class ConfigurationResult | ||
{ | ||
public ConfigurationResult(IConfigurationRoot configuration) | ||
{ | ||
Configuration = configuration; | ||
} | ||
|
||
public ConfigurationResult(Exception exception) | ||
{ | ||
Exception = exception; | ||
Configuration = new ConfigurationRoot(Array.Empty<IConfigurationProvider>()); | ||
} | ||
|
||
public IConfigurationRoot Configuration { get; } | ||
|
||
public Exception Exception { get; } | ||
|
||
public bool HasError() => Exception != null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
using System.Runtime.CompilerServices; | ||
using OmniSharp; | ||
using System.Runtime.CompilerServices; | ||
|
||
[assembly: InternalsVisibleTo("OmniSharp")] | ||
[assembly: InternalsVisibleTo("TestUtility")] | ||
[assembly: InternalsVisibleTo("OmniSharp.Http.Tests")] | ||
[assembly: InternalsVisibleTo("OmniSharp" + OmniSharpPublicKey.Key)] | ||
[assembly: InternalsVisibleTo("TestUtility" + OmniSharpPublicKey.Key)] | ||
[assembly: InternalsVisibleTo("OmniSharp.Http.Tests" + OmniSharpPublicKey.Key)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
using System.Runtime.CompilerServices; | ||
using OmniSharp; | ||
using System.Runtime.CompilerServices; | ||
|
||
[assembly: InternalsVisibleTo("TestUtility")] | ||
[assembly: InternalsVisibleTo("OmniSharp")] | ||
[assembly: InternalsVisibleTo("OmniSharp.Stdio.Tests")] | ||
[assembly: InternalsVisibleTo("OmniSharp.Lsp.Tests")] | ||
[assembly: InternalsVisibleTo("TestUtility" + OmniSharpPublicKey.Key)] | ||
[assembly: InternalsVisibleTo("OmniSharp" + OmniSharpPublicKey.Key)] | ||
[assembly: InternalsVisibleTo("OmniSharp.Stdio.Tests" + OmniSharpPublicKey.Key)] | ||
[assembly: InternalsVisibleTo("OmniSharp.Lsp.Tests" + OmniSharpPublicKey.Key)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
using System.Runtime.CompilerServices; | ||
using OmniSharp; | ||
using System.Runtime.CompilerServices; | ||
|
||
[assembly: InternalsVisibleTo("OmniSharp.MSBuild.Tests")] | ||
[assembly: InternalsVisibleTo("TestUtility")] | ||
[assembly: InternalsVisibleTo("OmniSharp.MSBuild.Tests" + OmniSharpPublicKey.Key)] | ||
[assembly: InternalsVisibleTo("TestUtility" + OmniSharpPublicKey.Key)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
using System.Runtime.CompilerServices; | ||
using OmniSharp; | ||
|
||
[assembly: InternalsVisibleTo("OmniSharp.Tests")] | ||
[assembly: InternalsVisibleTo("OmniSharp.Roslyn.CSharp")] | ||
[assembly: InternalsVisibleTo("OmniSharp.Tests" + OmniSharpPublicKey.Key)] | ||
[assembly: InternalsVisibleTo("OmniSharp.Roslyn.CSharp" + OmniSharpPublicKey.Key)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
using System.Runtime.CompilerServices; | ||
using OmniSharp; | ||
using System.Runtime.CompilerServices; | ||
|
||
[assembly: InternalsVisibleTo("OmniSharp.Roslyn.CSharp.Tests")] | ||
[assembly: InternalsVisibleTo("OmniSharp.Roslyn.CSharp.Tests" + OmniSharpPublicKey.Key)] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
using System.Runtime.CompilerServices; | ||
using OmniSharp; | ||
using System.Runtime.CompilerServices; | ||
|
||
[assembly: InternalsVisibleTo("OmniSharp")] | ||
[assembly: InternalsVisibleTo("OmniSharp.Host")] | ||
[assembly: InternalsVisibleTo("OmniSharp.MSBuild")] | ||
[assembly: InternalsVisibleTo("OmniSharp.Roslyn")] | ||
[assembly: InternalsVisibleTo("OmniSharp.Roslyn.CSharp")] | ||
[assembly: InternalsVisibleTo("OmniSharp.DotNetTest.Tests")] | ||
[assembly: InternalsVisibleTo("OmniSharp.Tests")] | ||
[assembly: InternalsVisibleTo("OmniSharp" + OmniSharpPublicKey.Key)] | ||
[assembly: InternalsVisibleTo("OmniSharp.Host" + OmniSharpPublicKey.Key)] | ||
[assembly: InternalsVisibleTo("OmniSharp.MSBuild" + OmniSharpPublicKey.Key)] | ||
[assembly: InternalsVisibleTo("OmniSharp.Roslyn" + OmniSharpPublicKey.Key)] | ||
[assembly: InternalsVisibleTo("OmniSharp.Roslyn.CSharp" + OmniSharpPublicKey.Key)] | ||
[assembly: InternalsVisibleTo("OmniSharp.DotNetTest.Tests" + OmniSharpPublicKey.Key)] | ||
[assembly: InternalsVisibleTo("OmniSharp.Tests" + OmniSharpPublicKey.Key)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
using System.Runtime.CompilerServices; | ||
using OmniSharp; | ||
using System.Runtime.CompilerServices; | ||
|
||
[assembly: InternalsVisibleTo("OmniSharp")] | ||
[assembly: InternalsVisibleTo("TestUtility")] | ||
[assembly: InternalsVisibleTo("OmniSharp.Stdio.Tests")] | ||
[assembly: InternalsVisibleTo("OmniSharp" + OmniSharpPublicKey.Key)] | ||
[assembly: InternalsVisibleTo("TestUtility" + OmniSharpPublicKey.Key)] | ||
[assembly: InternalsVisibleTo("OmniSharp.Stdio.Tests" + OmniSharpPublicKey.Key)] |
Oops, something went wrong.