Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tmat committed Feb 10, 2022
1 parent c8a37b9 commit 55ed7aa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ public PackageInstallerService(
: base(globalOptions,
listenerProvider,
threadingContext,
workspace,
featureEnabledOption: SymbolSearchGlobalOptions.Enabled,
perLanguageOptions: ImmutableArray.Create(SymbolSearchOptionsStorage.SearchReferenceAssemblies, SymbolSearchOptionsStorage.SearchNuGetPackages))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ internal abstract class AbstractDelayStartedService : ForegroundThreadAffinitize
{
private readonly List<string> _registeredLanguageNames = new();

private readonly Workspace _workspace;
private readonly IAsynchronousOperationListener _asyncListener;
private readonly IGlobalOptionService _globalOptions;

Expand All @@ -46,10 +47,12 @@ protected AbstractDelayStartedService(
IGlobalOptionService globalOptions,
IAsynchronousOperationListenerProvider listenerProvider,
IThreadingContext threadingContext,
Workspace workspace,
Option2<bool> featureEnabledOption,
ImmutableArray<PerLanguageOption2<bool>> perLanguageOptions)
: base(threadingContext)
{
_workspace = workspace;
_asyncListener = listenerProvider.GetListener(FeatureAttribute.Workspace);
_globalOptions = globalOptions;
_featureEnabledOption = featureEnabledOption;
Expand All @@ -75,7 +78,8 @@ internal void Connect(string languageName)
if (_registeredLanguageNames.Count == 1)
{
// Register to hear about option changing.
_globalOptions.OptionChanged += OnOptionChanged;
var optionsService = _workspace.Services.GetRequiredService<IOptionService>();
optionsService.OptionChanged += OnOptionChanged;
}

// Kick things off.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public VisualStudioSymbolSearchService(
: base(globalOptions,
listenerProvider,
threadingContext,
workspace,
featureEnabledOption: SymbolSearchGlobalOptions.Enabled,
perLanguageOptions: ImmutableArray.Create(SymbolSearchOptionsStorage.SearchReferenceAssemblies, SymbolSearchOptionsStorage.SearchNuGetPackages))
{
Expand Down

0 comments on commit 55ed7aa

Please sign in to comment.