提交 fe96d0e9 编写于 作者: K Kevin Halverson

Add back original method signatures as extensions (for convenience)...

上级 29f24d0f
......@@ -17,6 +17,7 @@
using Microsoft.CodeAnalysis.Remote;
using Microsoft.CodeAnalysis.Remote.Diagnostics;
using Microsoft.CodeAnalysis.Workspaces.Diagnostics;
using Microsoft.VisualStudio.LanguageServices.Implementation.Extensions;
using Microsoft.VisualStudio.LanguageServices.Remote;
using Roslyn.Utilities;
......@@ -84,7 +85,7 @@ internal class OutOfProcDiagnosticAnalyzerExecutor : IRemoteHostDiagnosticAnalyz
}
// TODO: send telemetry on session
using (var session = await client.CreateServiceSessionAsync(WellKnownServiceHubServices.CodeAnalysisService, solution, cancellationToken).ConfigureAwait(false))
using (var session = await client.CreateCodeAnalysisServiceSessionAsync(solution, cancellationToken).ConfigureAwait(false))
{
var argument = new DiagnosticArguments(
analyzerDriver.AnalysisOptions.ReportSuppressedDiagnostics,
......
// 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.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Remote;
using Microsoft.VisualStudio.LanguageServices.Remote;
using static Microsoft.VisualStudio.LanguageServices.Remote.RemoteHostClient;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.Extensions
{
internal static class RemoteHostClientExtensions
{
public static Task<Session> CreateCodeAnalysisServiceSessionAsync(this RemoteHostClient client, Solution solution, CancellationToken cancellationToken)
{
return CreateCodeAnalysisServiceSessionAsync(client, solution, callbackTarget: null, cancellationToken: cancellationToken);
}
public static Task<Session> CreateCodeAnalysisServiceSessionAsync(this RemoteHostClient client, Solution solution, object callbackTarget, CancellationToken cancellationToken)
{
return client.CreateServiceSessionAsync(WellKnownServiceHubServices.CodeAnalysisService, solution, callbackTarget, cancellationToken);
}
}
}
......@@ -93,6 +93,7 @@
<Link>Shared\WellKnownServiceHubServices.cs</Link>
</Compile>
<Compile Include="Diagnostics\OutOfProcDiagnosticAnalyzerExecutor.cs" />
<Compile Include="Extensions\RemoteHostClientExtensions.cs" />
<Compile Include="FindReferences\FindReferencesTableControlEventProcessorProvider.cs" />
<Compile Include="FindReferences\ISupportsNavigation.cs" />
<Compile Include="FindReferences\StreamingFindReferencesPresenter.cs" />
......@@ -125,4 +126,4 @@
<InternalsVisibleTo Include="Microsoft.CodeAnalysis.TestImpact.BuildManager" />
</ItemGroup>
<Import Project="..\..\..\build\Targets\VSL.Imports.targets" />
</Project>
</Project>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册