提交 225469ba 编写于 作者: O Omar Tawfik 提交者: GitHub

Merge pull request #14889 from vslsnap/merge-dev15-rc-into-master20161102-150038

Merge dev15-rc into master
......@@ -8,10 +8,10 @@ vs.dependencies
vs.dependency id=Microsoft.Net.4.6.1.FullRedist.Resources
folder InstallDir:\MSBuild\15.0\Bin
file source=$(OutputPath)\Exes\VBCSCompiler\VBCSCompiler.exe vs.file.ngen=yes
file source=$(OutputPath)\Exes\csc\csc.exe vs.file.ngen=yes
file source=$(OutputPath)\Exes\csi\csi.exe vs.file.ngen=yes
file source=$(OutputPath)\Exes\vbc\vbc.exe vs.file.ngen=yes
file source=$(OutputPath)\Exes\VBCSCompiler\VBCSCompiler.exe vs.file.ngenArchitecture=all
file source=$(OutputPath)\Exes\csc\csc.exe vs.file.ngenArchitecture=all
file source=$(OutputPath)\Exes\csi\csi.exe vs.file.ngenArchitecture=all
file source=$(OutputPath)\Exes\vbc\vbc.exe vs.file.ngenArchitecture=all
file source=$(OutputPath)\Exes\csc\csc.exe.config
file source=$(OutputPath)\Exes\vbc\vbc.exe.config
......@@ -24,46 +24,46 @@ folder InstallDir:\MSBuild\15.0\Bin
file source=$(OutputPath)\Dlls\MSBuildTask\Microsoft.VisualBasic.Core.targets
file source=$(OutputPath)\Dlls\MSBuildTask\Microsoft.CSharp.Core.targets
file source=$(OutputPath)\Dlls\Scripting\Microsoft.CodeAnalysis.Scripting.dll vs.file.ngen=yes
file source=$(OutputPath)\Dlls\CSharpScripting\Microsoft.CodeAnalysis.CSharp.Scripting.dll vs.file.ngen=yes
file source=$(OutputPath)\Dlls\CSharpCodeAnalysis\Microsoft.CodeAnalysis.CSharp.dll vs.file.ngen=yes
file source=$(OutputPath)\Dlls\MSBuildTask\Microsoft.Build.Tasks.CodeAnalysis.dll vs.file.ngen=yes
file source=$(OutputPath)\Dlls\BasicCodeAnalysis\Microsoft.CodeAnalysis.VisualBasic.dll vs.file.ngen=yes
file source=$(OutputPath)\Dlls\CodeAnalysis\Microsoft.CodeAnalysis.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Collections.Immutable.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Reflection.Metadata.dll vs.file.ngen=yes
file source=$(OutputPath)\Exes\csi\System.ValueTuple.dll vs.file.ngen=yes
file source=$(OutputPath)\Dlls\Scripting\Microsoft.CodeAnalysis.Scripting.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Dlls\CSharpScripting\Microsoft.CodeAnalysis.CSharp.Scripting.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Dlls\CSharpCodeAnalysis\Microsoft.CodeAnalysis.CSharp.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Dlls\MSBuildTask\Microsoft.Build.Tasks.CodeAnalysis.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Dlls\BasicCodeAnalysis\Microsoft.CodeAnalysis.VisualBasic.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Dlls\CodeAnalysis\Microsoft.CodeAnalysis.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Collections.Immutable.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Reflection.Metadata.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Exes\csi\System.ValueTuple.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\Microsoft.DiaSymReader.Native.amd64.dll
file source=$(OutputPath)\Vsix\CompilerExtension\Microsoft.DiaSymReader.Native.x86.dll
file source=$(OutputPath)\Vsix\CompilerExtension\System.AppContext.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Console.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Diagnostics.FileVersionInfo.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.IO.Compression.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.IO.FileSystem.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.IO.FileSystem.DriveInfo.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.IO.FileSystem.Primitives.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.IO.Pipes.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Runtime.InteropServices.RuntimeInformation.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Security.AccessControl.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Security.Claims.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Security.Cryptography.Algorithms.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Security.Cryptography.Encoding.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Security.Cryptography.Primitives.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Security.Cryptography.X509Certificates.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Security.Principal.Windows.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Text.Encoding.CodePages.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Threading.Thread.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Xml.XmlDocument.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Xml.XPath.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Xml.XPath.XDocument.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.AppContext.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Console.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Diagnostics.FileVersionInfo.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.IO.Compression.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.IO.FileSystem.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.IO.FileSystem.DriveInfo.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.IO.FileSystem.Primitives.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.IO.Pipes.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Runtime.InteropServices.RuntimeInformation.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Security.AccessControl.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Security.Claims.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Security.Cryptography.Algorithms.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Security.Cryptography.Encoding.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Security.Cryptography.Primitives.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Security.Cryptography.X509Certificates.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Security.Principal.Windows.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Text.Encoding.CodePages.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Threading.Thread.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Xml.XmlDocument.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Xml.XPath.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Xml.XPath.XDocument.dll vs.file.ngenArchitecture=all
folder InstallDir:\MSBuild\15.0\Bin\amd64
file source=$(OutputPath)\Exes\VBCSCompiler\VBCSCompiler.exe vs.file.ngen=yes
file source=$(OutputPath)\Exes\csc\csc.exe vs.file.ngen=yes
file source=$(OutputPath)\Exes\csi\csi.exe vs.file.ngen=yes
file source=$(OutputPath)\Exes\vbc\vbc.exe vs.file.ngen=yes
file source=$(OutputPath)\Exes\VBCSCompiler\VBCSCompiler.exe vs.file.ngenArchitecture=all
file source=$(OutputPath)\Exes\csc\csc.exe vs.file.ngenArchitecture=all
file source=$(OutputPath)\Exes\csi\csi.exe vs.file.ngenArchitecture=all
file source=$(OutputPath)\Exes\vbc\vbc.exe vs.file.ngenArchitecture=all
file source=$(OutputPath)\Exes\csc\csc.exe.config
file source=$(OutputPath)\Exes\vbc\vbc.exe.config
......@@ -76,37 +76,37 @@ folder InstallDir:\MSBuild\15.0\Bin\amd64
file source=$(OutputPath)\Dlls\MSBuildTask\Microsoft.VisualBasic.Core.targets
file source=$(OutputPath)\Dlls\MSBuildTask\Microsoft.CSharp.Core.targets
file source=$(OutputPath)\Dlls\Scripting\Microsoft.CodeAnalysis.Scripting.dll vs.file.ngen=yes
file source=$(OutputPath)\Dlls\CSharpScripting\Microsoft.CodeAnalysis.CSharp.Scripting.dll vs.file.ngen=yes
file source=$(OutputPath)\Dlls\CSharpCodeAnalysis\Microsoft.CodeAnalysis.CSharp.dll vs.file.ngen=yes
file source=$(OutputPath)\Dlls\MSBuildTask\Microsoft.Build.Tasks.CodeAnalysis.dll vs.file.ngen=yes
file source=$(OutputPath)\Dlls\BasicCodeAnalysis\Microsoft.CodeAnalysis.VisualBasic.dll vs.file.ngen=yes
file source=$(OutputPath)\Dlls\CodeAnalysis\Microsoft.CodeAnalysis.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Collections.Immutable.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Reflection.Metadata.dll vs.file.ngen=yes
file source=$(OutputPath)\Exes\csi\System.ValueTuple.dll vs.file.ngen=yes
file source=$(OutputPath)\Dlls\Scripting\Microsoft.CodeAnalysis.Scripting.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Dlls\CSharpScripting\Microsoft.CodeAnalysis.CSharp.Scripting.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Dlls\CSharpCodeAnalysis\Microsoft.CodeAnalysis.CSharp.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Dlls\MSBuildTask\Microsoft.Build.Tasks.CodeAnalysis.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Dlls\BasicCodeAnalysis\Microsoft.CodeAnalysis.VisualBasic.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Dlls\CodeAnalysis\Microsoft.CodeAnalysis.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Collections.Immutable.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Reflection.Metadata.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Exes\csi\System.ValueTuple.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\Microsoft.DiaSymReader.Native.amd64.dll
file source=$(OutputPath)\Vsix\CompilerExtension\Microsoft.DiaSymReader.Native.x86.dll
file source=$(OutputPath)\Vsix\CompilerExtension\System.AppContext.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Console.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Diagnostics.FileVersionInfo.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.IO.Compression.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.IO.FileSystem.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.IO.FileSystem.DriveInfo.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.IO.FileSystem.Primitives.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.IO.Pipes.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Runtime.InteropServices.RuntimeInformation.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Security.AccessControl.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Security.Claims.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Security.Cryptography.Algorithms.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Security.Cryptography.Encoding.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Security.Cryptography.Primitives.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Security.Cryptography.X509Certificates.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Security.Principal.Windows.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Text.Encoding.CodePages.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Threading.Thread.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Xml.XmlDocument.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Xml.XPath.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.Xml.XPath.XDocument.dll vs.file.ngen=yes
file source=$(OutputPath)\Vsix\CompilerExtension\System.AppContext.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Console.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Diagnostics.FileVersionInfo.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.IO.Compression.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.IO.FileSystem.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.IO.FileSystem.DriveInfo.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.IO.FileSystem.Primitives.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.IO.Pipes.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Runtime.InteropServices.RuntimeInformation.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Security.AccessControl.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Security.Claims.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Security.Cryptography.Algorithms.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Security.Cryptography.Encoding.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Security.Cryptography.Primitives.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Security.Cryptography.X509Certificates.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Security.Principal.Windows.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Text.Encoding.CodePages.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Threading.Thread.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Xml.XmlDocument.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Xml.XPath.dll vs.file.ngenArchitecture=all
file source=$(OutputPath)\Vsix\CompilerExtension\System.Xml.XPath.XDocument.dll vs.file.ngenArchitecture=all
......@@ -20,6 +20,7 @@ internal partial class ServiceHubRemoteHostClient : RemoteHostClient
{
private readonly HubClient _hubClient;
private readonly JsonRpc _rpc;
private readonly string _hostGroup;
public static async Task<RemoteHostClient> CreateAsync(
Workspace workspace, CancellationToken cancellationToken)
......@@ -27,12 +28,13 @@ internal partial class ServiceHubRemoteHostClient : RemoteHostClient
using (Logger.LogBlock(FunctionId.ServiceHubRemoteHostClient_CreateAsync, cancellationToken))
{
var primary = new HubClient("ManagedLanguage.IDE.RemoteHostClient");
var remoteHostStream = await primary.RequestServiceAsync(WellKnownRemoteHostServices.RemoteHostService, cancellationToken).ConfigureAwait(false);
var current = $"VS ({Process.GetCurrentProcess().Id})";
var remoteHostStream = await RequestServiceAsync(primary, WellKnownRemoteHostServices.RemoteHostService, current, cancellationToken).ConfigureAwait(false);
var instance = new ServiceHubRemoteHostClient(workspace, primary, remoteHostStream);
var instance = new ServiceHubRemoteHostClient(workspace, primary, current, remoteHostStream);
// make sure connection is done right
var current = $"VS ({Process.GetCurrentProcess().Id})";
var host = await instance._rpc.InvokeAsync<string>(WellKnownRemoteHostServices.RemoteHostService_Connect, current).ConfigureAwait(false);
// TODO: change this to non fatal watson and make VS to use inproc implementation
......@@ -61,10 +63,12 @@ private static void RegisterWorkspaceHost(Workspace workspace, RemoteHostClient
new WorkspaceHost(vsWorkspace, client));
}
private ServiceHubRemoteHostClient(Workspace workspace, HubClient hubClient, Stream stream) :
private ServiceHubRemoteHostClient(
Workspace workspace, HubClient hubClient, string hostGroup, Stream stream) :
base(workspace)
{
_hubClient = hubClient;
_hostGroup = hostGroup;
_rpc = JsonRpc.Attach(stream, target: this);
......@@ -76,11 +80,11 @@ protected override async Task<Session> CreateServiceSessionAsync(string serviceN
{
// get stream from service hub to communicate snapshot/asset related information
// this is the back channel the system uses to move data between VS and remote host
var snapshotStream = await _hubClient.RequestServiceAsync(WellKnownServiceHubServices.SnapshotService, cancellationToken).ConfigureAwait(false);
var snapshotStream = await RequestServiceAsync(_hubClient, WellKnownServiceHubServices.SnapshotService, _hostGroup, cancellationToken).ConfigureAwait(false);
// get stream from service hub to communicate service specific information
// this is what consumer actually use to communicate information
var serviceStream = await _hubClient.RequestServiceAsync(serviceName, cancellationToken).ConfigureAwait(false);
var serviceStream = await RequestServiceAsync(_hubClient, serviceName, _hostGroup, cancellationToken).ConfigureAwait(false);
return await JsonRpcSession.CreateAsync(snapshot, snapshotStream, callbackTarget, serviceStream, cancellationToken).ConfigureAwait(false);
}
......@@ -98,5 +102,19 @@ private void OnRpcDisconnected(object sender, JsonRpcDisconnectedEventArgs e)
{
Disconnected();
}
private static async Task<Stream> RequestServiceAsync(HubClient client, string serviceName, string hostGroup, CancellationToken cancellationToken = default(CancellationToken))
{
// we can remove these once whole system moved to new servicehub API
try
{
var descriptor = new ServiceDescriptor(serviceName) { HostGroup = new HostGroup(hostGroup) };
return await client.RequestServiceAsync(descriptor, cancellationToken).ConfigureAwait(false);
}
catch
{
return await client.RequestServiceAsync(serviceName, cancellationToken).ConfigureAwait(false);
}
}
}
}
\ No newline at end of file
......@@ -10,7 +10,7 @@
"version": "14.3.25407",
"suppressParent": "all"
},
"Microsoft.ServiceHub.Client": "0.13.78-alpha-gf674a884a9",
"Microsoft.ServiceHub.Client": "1.0.177-rc-g56d40a8a02",
"Newtonsoft.Json": "8.0.3",
"RoslynDependencies.Microsoft.VisualStudio.Shell.Interop.15.0.DesignTime": "15.0.25718-Preview5",
"RoslynDependencies.Microsoft.VisualStudio.Workspace": "14.0.983-pre-ge167e81694",
......
{
"host": "desktopClr",
"hostId": "RoslynCodeAnalysisService",
"host": "desktopClr.x86",
"hostId": "RoslynCodeAnalysisService32",
"hostGroupAllowed": true,
"entryPoint": {
"assemblyPath": "Microsoft.CodeAnalysis.Remote.ServiceHub.dll",
"fullClassName": "Microsoft.CodeAnalysis.Remote.CodeAnalysisService",
......
{
"host": "desktopClr",
"hostId": "RoslynCodeAnalysisService",
"host": "desktopClr.x86",
"hostId": "RoslynCodeAnalysisService32",
"hostGroupAllowed": true,
"entryPoint": {
"assemblyPath": "Microsoft.CodeAnalysis.Remote.ServiceHub.dll",
"fullClassName": "Microsoft.CodeAnalysis.Remote.RemoteHostService",
......
{
"host": "desktopClr",
"hostId": "RoslynCodeAnalysisService",
"host": "desktopClr.x86",
"hostId": "RoslynCodeAnalysisService32",
"hostGroupAllowed": true,
"entryPoint": {
"assemblyPath": "Microsoft.CodeAnalysis.Remote.ServiceHub.dll",
"fullClassName": "Microsoft.CodeAnalysis.Remote.RemoteSymbolSearchUpdateEngine",
......
{
"host": "desktopClr",
"hostId": "RoslynCodeAnalysisService",
"host": "desktopClr.x86",
"hostId": "RoslynCodeAnalysisService32",
"hostGroupAllowed": true,
"entryPoint": {
"assemblyPath": "Microsoft.CodeAnalysis.Remote.ServiceHub.dll",
"fullClassName": "Microsoft.CodeAnalysis.Remote.SnapshotService",
......
......@@ -138,10 +138,14 @@ private async Task<object> RequestAssetAsync(Checksum checksum, CancellationToke
return SpecializedCollections.EmptyList<ValueTuple<Checksum, object>>();
}
var source = _assetStorage.GetAssetSource(_sessionId);
var source = _assetStorage.TryGetAssetSource(_sessionId);
cancellationToken.ThrowIfCancellationRequested();
if (source == null)
{
return SpecializedCollections.EmptyList<ValueTuple<Checksum, object>>();
}
try
{
// ask one of asset source for data
......
......@@ -35,9 +35,15 @@ public AssetStorage()
Task.Run(CleanAssetsAsync, CancellationToken.None);
}
public AssetSource GetAssetSource(int sessionId)
public AssetSource TryGetAssetSource(int sessionId)
{
return _assetSources[sessionId];
AssetSource source;
if (_assetSources.TryGetValue(sessionId, out source))
{
return source;
}
return null;
}
public void RegisterAssetSource(int sessionId, AssetSource assetSource)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册