예제 #1
0
 private SolutionOptionSet(
     ILegacyWorkspaceOptionService globalOptions,
     ImmutableDictionary <OptionKey, object?> values,
     ImmutableHashSet <OptionKey> changedOptionKeys)
 {
     _globalOptions     = globalOptions;
     _values            = values;
     _changedOptionKeys = changedOptionKeys;
 }
예제 #2
0
        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);
        }
예제 #3
0
 internal SolutionOptionSet(ILegacyWorkspaceOptionService globalOptions)
     : this(globalOptions, values : ImmutableDictionary <OptionKey, object?> .Empty, changedOptionKeys : ImmutableHashSet <OptionKey> .Empty)
 {
 }