diff --git a/.editorconfig b/.editorconfig
index 2bbdd48250..0aff6e75ca 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -8,6 +8,12 @@ insert_final_newline = true
indent_style = space
indent_size = 4
+dotnet_diagnostic.VSTHRD002.severity = none
+dotnet_diagnostic.VSTHRD003.severity = none
+dotnet_diagnostic.VSTHRD105.severity = none
+dotnet_diagnostic.VSTHRD110.severity = none
+dotnet_diagnostic.VSTHRD200.severity = none
+
[*.cs]
indent_size = 4
diff --git a/build/Packages.props b/build/Packages.props
index 3046dae4dc..88cec7fc18 100644
--- a/build/Packages.props
+++ b/build/Packages.props
@@ -62,8 +62,8 @@
-
-
+
+
diff --git a/src/OmniSharp.Host/MSBuild/Discovery/MSBuildLocator.cs b/src/OmniSharp.Host/MSBuild/Discovery/MSBuildLocator.cs
index 872a17758d..24c2435a2c 100644
--- a/src/OmniSharp.Host/MSBuild/Discovery/MSBuildLocator.cs
+++ b/src/OmniSharp.Host/MSBuild/Discovery/MSBuildLocator.cs
@@ -36,7 +36,11 @@ protected override void DisposeCore(bool disposing)
{
if (RegisteredInstance != null)
{
- AppDomain.CurrentDomain.AssemblyResolve -= Resolve;
+ try
+ {
+ AppDomain.CurrentDomain.AssemblyResolve -= Resolve;
+ }
+ catch (AppDomainUnloadedException){ } // Ignore if the AppDomain is going away (like during a test in xunit)
RegisteredInstance = null;
}
}
diff --git a/src/OmniSharp.LanguageServerProtocol/Handlers/OmniSharpCodeActionHandler.cs b/src/OmniSharp.LanguageServerProtocol/Handlers/OmniSharpCodeActionHandler.cs
index 793c32aa61..bfe2dc049a 100644
--- a/src/OmniSharp.LanguageServerProtocol/Handlers/OmniSharpCodeActionHandler.cs
+++ b/src/OmniSharp.LanguageServerProtocol/Handlers/OmniSharpCodeActionHandler.cs
@@ -19,7 +19,7 @@
namespace OmniSharp.LanguageServerProtocol.Handlers
{
- internal sealed class OmniSharpCodeActionHandler : CodeActionHandler, IExecuteCommandHandler
+ internal sealed class OmniSharpCodeActionHandler : CodeActionHandlerBase, IExecuteCommandHandler
{
public static IEnumerable Enumerate(
RequestHandlers handlers,
@@ -116,6 +116,11 @@ public override async Task Handle(CodeActionParams
codeActions.Select(ca => new CommandOrCodeAction(ca)));
}
+ public override Task Handle(CodeAction request, CancellationToken cancellationToken)
+ {
+ return Task.FromResult(request);
+ }
+
public async Task Handle(ExecuteCommandParams request, CancellationToken cancellationToken)
{
Debug.Assert(request.Command == "omnisharp/executeCodeAction");
diff --git a/src/OmniSharp.LanguageServerProtocol/LanguageProtocolInteropHandler.cs b/src/OmniSharp.LanguageServerProtocol/LanguageProtocolInteropHandler.cs
index 007419df58..2f6c8f92ea 100644
--- a/src/OmniSharp.LanguageServerProtocol/LanguageProtocolInteropHandler.cs
+++ b/src/OmniSharp.LanguageServerProtocol/LanguageProtocolInteropHandler.cs
@@ -41,7 +41,7 @@ public static LanguageProtocolInteropHandler Factory(
public class LanguageProtocolInteropHandler : LanguageProtocolInteropHandler
{
private readonly IPredicateHandler _languagePredicateHandler;
- private readonly Lazy[]>>> _exports;
+ private readonly Lazy[]>> _exports;
private readonly bool _hasLanguageProperty;
private readonly bool _hasFileNameProperty;
private readonly bool _canBeAggregated;
@@ -60,11 +60,10 @@ public LanguageProtocolInteropHandler(IPredicateHandler languagePredicateHandler
_canBeAggregated = typeof(IAggregateResponse).IsAssignableFrom(metadata.ResponseType);
_updateBufferHandler = updateBufferHandler;
- _exports = new Lazy[]>>>(() =>
- LoadExportHandlers(handlers));
+ _exports = new Lazy[]>>(() =>LoadExportHandlers(handlers));
}
- private Task[]>> LoadExportHandlers(
+ private Dictionary[]> LoadExportHandlers(
IEnumerable> handlers)
{
var interfaceHandlers = handlers
@@ -76,12 +75,12 @@ private Task[]>> LoadExp
// .Select(plugin => (plugin.Config.Language, plugin));
// Group handlers by language and sort each group for consistency
- return Task.FromResult(interfaceHandlers
+ return interfaceHandlers
// .Concat(plugins)
.GroupBy(export => export.Language, StringComparer.OrdinalIgnoreCase)
.ToDictionary(
group => group.Key,
- group => group.OrderBy(g => g.Handler).Select(z => z.Handler).ToArray()));
+ group => group.OrderBy(g => g.Handler).Select(z => z.Handler).ToArray());
}
public string EndpointName { get; }
@@ -207,7 +206,7 @@ private async Task