提交 017ed424 编写于 作者: O Omar Tawfik 提交者: GitHub

Merge pull request #15088 from vslsnap/merge-dev15-rc-into-master20161108-160029

Merge dev15-rc into master
......@@ -65,9 +65,23 @@ internal class JsonRpcSession : RemoteHostClient.Session
private async Task InitializeAsync()
{
// all roslyn remote service must based on ServiceHubServiceBase which implements Initialize method
await _snapshotClient.InvokeAsync(WellKnownServiceHubServices.ServiceHubServiceBase_Initialize, _currentSessionId, PinnedScope.SolutionChecksum.ToArray()).ConfigureAwait(false);
await _serviceClient.InvokeAsync(WellKnownServiceHubServices.ServiceHubServiceBase_Initialize, _currentSessionId, PinnedScope.SolutionChecksum.ToArray()).ConfigureAwait(false);
CancellationToken.ThrowIfCancellationRequested();
try
{
// all roslyn remote service must based on ServiceHubServiceBase which implements Initialize method
await _snapshotClient.InvokeAsync(WellKnownServiceHubServices.ServiceHubServiceBase_Initialize, _currentSessionId, PinnedScope.SolutionChecksum.ToArray()).ConfigureAwait(false);
await _serviceClient.InvokeAsync(WellKnownServiceHubServices.ServiceHubServiceBase_Initialize, _currentSessionId, PinnedScope.SolutionChecksum.ToArray()).ConfigureAwait(false);
}
catch (ObjectDisposedException)
{
// object disposed exception can be thrown from StreamJsonRpc if JsonRpc is disposed in the middle of read/write.
// the way we added cancellation support to the JsonRpc which doesn't support cancellation natively
// can cause this exception to happen. newer version supports cancellation token natively, but
// we can't use it now, so we will catch object disposed exception and check cancellation token
CancellationToken.ThrowIfCancellationRequested();
throw;
}
}
public override Task InvokeAsync(string targetName, params object[] arguments)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册