提交 a97a3e68 编写于 作者: D David Barbet

Fix threading context.

上级 8e2608d5
......@@ -32,13 +32,14 @@ internal class CSharpLspEditorClassificationFactoryService : ILanguageServiceFac
{
private readonly RoslynLSPClientServiceFactory _roslynLSPClientServiceFactory;
private readonly ClassificationTypeMap _classificationTypeMap;
private readonly ThreadingContext _threadingContext;
private readonly IThreadingContext _threadingContext;
[ImportingConstructor]
public CSharpLspEditorClassificationFactoryService(RoslynLSPClientServiceFactory roslynLSPClientServiceFactory, ClassificationTypeMap classificationTypeMap, IThreadingContext threadingContext)
{
_roslynLSPClientServiceFactory = roslynLSPClientServiceFactory ?? throw new ArgumentNullException(nameof(roslynLSPClientServiceFactory));
_classificationTypeMap = classificationTypeMap ?? throw new ArgumentNullException(nameof(classificationTypeMap));
_threadingContext = threadingContext;
}
public ILanguageService CreateLanguageService(HostLanguageServices languageServices)
......
......@@ -63,7 +63,7 @@ protected override async Task<IEnumerable<CodeActionOperation>> ComputePreviewOp
return ImmutableArray<CodeActionOperation>.Empty;
}
Document newDocument = await ApplyEditsAsync(_document, textEdits, cancellationToken).ConfigureAwait(false);
var newDocument = await ApplyEditsAsync(_document, textEdits, cancellationToken).ConfigureAwait(false);
return ImmutableArray.Create(new ApplyChangesOperation(newDocument.Project.Solution));
}
......
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Composition;
/*using System.Composition;
using Microsoft.CodeAnalysis.Editor;
using Microsoft.CodeAnalysis.Editor.Host;
using Microsoft.CodeAnalysis.Editor.Shared.Utilities;
......@@ -26,4 +26,4 @@ internal class VBLspGotoDefinitionService : RoslynGotoDefinitionService
RemoteLanguageServiceWorkspace remoteWorkspace, IThreadingContext threadingContext)
: base(streamingPresenter, roslynLSPClientServiceFactory, remoteWorkspace, threadingContext) { }
}
}
}*/
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
/*using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
......@@ -120,4 +120,4 @@ private async TPL.Task<ImmutableArray<DefinitionItem>> GetDefinitionItemsAsync(D
return definitionItems.ToImmutable();
}
}
}
}*/
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Composition;
/*using System.Composition;
using Microsoft.CodeAnalysis.Editor.FindUsages;
using Microsoft.CodeAnalysis.Host.Mef;
......@@ -25,4 +25,4 @@ public VBLspFindUsagesService(RoslynLSPClientServiceFactory roslynLSPClientServi
{
}
}
}
}*/
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
/*using System;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
......@@ -99,4 +99,4 @@ public async Task FindReferencesAsync(Document document, int position, IFindUsag
}
}
}
}
}*/
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册