private SolutionOptionSet( ILegacyWorkspaceOptionService globalOptions, ImmutableDictionary <OptionKey, object?> values, ImmutableHashSet <OptionKey> changedOptionKeys) { _globalOptions = globalOptions; _values = values; _changedOptionKeys = changedOptionKeys; }
private void EnsureOptionPageCreated() { if (s_optionStore == null) { var componentModel = (IComponentModel)this.Site.GetService(typeof(SComponentModel)); var workspace = componentModel.GetService <VisualStudioWorkspace>(); s_optionService = workspace.Services.GetService <ILegacyWorkspaceOptionService>(); s_optionStore = new OptionStore(new SolutionOptionSet(s_optionService), Enumerable.Empty <IOption>()); } // Use a single option store for all option pages so that changes are accumulated // together and, in the case of the same option appearing on two pages, the changes // are kept in sync. pageControl ??= CreateOptionPage(this.Site, s_optionStore); }
internal SolutionOptionSet(ILegacyWorkspaceOptionService globalOptions) : this(globalOptions, values : ImmutableDictionary <OptionKey, object?> .Empty, changedOptionKeys : ImmutableHashSet <OptionKey> .Empty) { }