提交 1debaf87 编写于 作者: C CyrusNajmabadi

Enable OOP server to use sqlite storage provider.

上级 8ae04488
......@@ -9,7 +9,7 @@ internal static class NavigateToOptions
private const string LocalRegistryPath = @"Roslyn\Features\NavigateTo\";
public static readonly Option<bool> OutOfProcessAllowed = new Option<bool>(
nameof(NavigateToOptions), nameof(OutOfProcessAllowed), defaultValue: false,
nameof(NavigateToOptions), nameof(OutOfProcessAllowed), defaultValue: true,
storageLocations: new LocalUserProfileStorageLocation(LocalRegistryPath + nameof(OutOfProcessAllowed)));
}
}
\ No newline at end of file
......@@ -139,7 +139,7 @@ internal void SolutionClosed()
var solutionInfo = SolutionInfo.Create(id, version.Value, solutionFilePath, projects: projectInfos);
this.Host.OnSolutionAdded(solutionInfo);
_tracker.NotifyWorkspaceHosts(host => host.OnSolutionAdded(solutionInfo));
_solutionAdded = true;
}
......
......@@ -74,6 +74,10 @@ private static async Task RegisterWorkspaceHostAsync(Workspace workspace, Remote
// don't block UI thread while initialize workspace host
var host = new WorkspaceHost(vsWorkspace, client);
// Initialize the remote side with whatever data we have currently for the workspace.
// As workspace changes happen, this host will get notified, and it can remote those
// changes appropriately over to the remote size.
await host.InitializeAsync().ConfigureAwait(false);
// RegisterWorkspaceHost is required to be called from UI thread so push the code
......@@ -81,6 +85,15 @@ private static async Task RegisterWorkspaceHostAsync(Workspace workspace, Remote
await Task.Factory.SafeStartNew(() =>
{
vsWorkspace.GetProjectTrackerAndInitializeIfNecessary(Shell.ServiceProvider.GlobalProvider).RegisterWorkspaceHost(host);
// There may have been notifications fired by the workspace between the time we
// were created and now when we let it know about us. Because of that, we need
// to do another initialization pass to make sure all the current workpsace
// state is pushed over to the remote side.
//
// We can do this in a fire and forget manner. We don't want to block the UI
// thread while we're pushing this data over.
Task.Run(() => host.InitializeAsync());
}, CancellationToken.None, ForegroundThreadAffinitizedObject.CurrentForegroundThreadData.TaskScheduler).ConfigureAwait(false);
}
......
......@@ -9,7 +9,7 @@ internal static class SymbolFinderOptions
private const string LocalRegistryPath = @"Roslyn\Features\SymbolFinder\";
public static readonly Option<bool> OutOfProcessAllowed = new Option<bool>(
nameof(SymbolFinderOptions), nameof(OutOfProcessAllowed), defaultValue: false,
nameof(SymbolFinderOptions), nameof(OutOfProcessAllowed), defaultValue: true,
storageLocations: new LocalUserProfileStorageLocation(LocalRegistryPath + nameof(OutOfProcessAllowed)));
}
}
\ No newline at end of file
......@@ -44,8 +44,7 @@ public static void UpdateStorageLocation(SolutionId id, string storageLocation)
}
else
{
// Store the esent database in a different location for the out of proc server.
_idToStorageLocation[id] = Path.Combine(storageLocation, "Server");
_idToStorageLocation[id] = storageLocation;
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册