提交 8c3af328 编写于 作者: H Heejae Chang 提交者: GitHub

Merge pull request #16228 from heejaechang/streamJson2

move more service to new JsonConverter
......@@ -61,13 +61,11 @@ private async Task RegisterPrimarySolutionAsync()
{
await session.InvokeAsync(
WellKnownRemoteHostServices.RemoteHostService_PersistentStorageService_RegisterPrimarySolutionId,
solutionId.Id.ToByteArray(),
solutionId.DebugName).ConfigureAwait(false);
solutionId).ConfigureAwait(false);
await session.InvokeAsync(
WellKnownRemoteHostServices.RemoteHostService_PersistentStorageService_UpdateSolutionIdStorageLocation,
solutionId.Id.ToByteArray(),
solutionId.DebugName,
solutionId,
_workspace.DeferredState?.ProjectTracker.GetWorkingFolderPath(_workspace.CurrentSolution)).ConfigureAwait(false);
}
}
......@@ -102,8 +100,7 @@ public void OnSolutionRemoved()
// ask remote host to sync initial asset
await session.InvokeAsync(
WellKnownRemoteHostServices.RemoteHostService_PersistentStorageService_UnregisterPrimarySolutionId,
solutionId.Id.ToByteArray(),
solutionId.DebugName,
solutionId,
synchronousShutdown).ConfigureAwait(false);
}
}
......
......@@ -57,10 +57,8 @@ public string Connect(string host)
return _host;
}
public async Task SynchronizePrimaryWorkspaceAsync(byte[] solutionChecksum)
public async Task SynchronizePrimaryWorkspaceAsync(Checksum checksum)
{
var checksum = new Checksum(solutionChecksum);
using (RoslynLogger.LogBlock(FunctionId.RemoteHostService_Synchronize, c => c.ToString(), checksum, CancellationToken))
{
try
......@@ -123,10 +121,8 @@ public async Task SynchronizePrimaryWorkspaceAsync(byte[] solutionChecksum)
#region PersistentStorageService messages
public void PersistentStorageService_RegisterPrimarySolutionId(byte[] solutionIdGuidBytes, string solutionIdDebugName)
public void PersistentStorageService_RegisterPrimarySolutionId(SolutionId solutionId)
{
var solutionId = CreateSolutionId(solutionIdGuidBytes, solutionIdDebugName);
var persistentStorageService = GetPersistentStorageService();
persistentStorageService?.RegisterPrimarySolution(solutionId);
}
......@@ -141,24 +137,17 @@ private static PersistentStorageService GetPersistentStorageService()
return persistentStorageService;
}
public void PersistentStorageService_UnregisterPrimarySolutionId(byte[] solutionIdGuidBytes, string solutionIdDebugName, bool synchronousShutdown)
public void PersistentStorageService_UnregisterPrimarySolutionId(SolutionId solutionId, bool synchronousShutdown)
{
var solutionId = CreateSolutionId(solutionIdGuidBytes, solutionIdDebugName);
var persistentStorageService = GetPersistentStorageService();
persistentStorageService?.UnregisterPrimarySolution(solutionId, synchronousShutdown);
}
public void PersistentStorageService_UpdateSolutionIdStorageLocation(byte[] solutionIdGuidBytes, string solutionIdDebugName, string storageLocation)
public void PersistentStorageService_UpdateSolutionIdStorageLocation(SolutionId solutionId, string storageLocation)
{
var solutionId = CreateSolutionId(solutionIdGuidBytes, solutionIdDebugName);
RemotePersistentStorageLocationService.UpdateStorageLocation(solutionId, storageLocation);
}
private static SolutionId CreateSolutionId(byte[] solutionIdGuidBytes, string solutionIdDebugName)
{
return SolutionId.CreateFromSerialized(new Guid(solutionIdGuidBytes), solutionIdDebugName);
}
#endregion
}
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册