27 references to GetOption
Microsoft.CodeAnalysis.Workspaces (2)
Options\OptionSet.cs (2)
47=> GetOption<T>(new OptionKey(option)); 59=> GetOption<T>(new OptionKey(option, language));
Microsoft.CodeAnalysis.Workspaces.UnitTests (25)
WorkspaceServiceTests\GlobalOptionServiceTests.cs (25)
66Assert.Equal(optionKey.Option.DefaultValue, optionSet.GetOption<int>(optionKey)); 67Assert.Equal(perLanguageOptionKey.Option.DefaultValue, optionSet.GetOption<int>(perLanguageOptionKey)); 70Assert.Equal(2, newSet.GetOption<int>(optionKey)); 71Assert.Equal(3, newSet.GetOption<int>(perLanguageOptionKey)); 74Assert.Equal(2, newSolution1.Options.GetOption<int>(optionKey)); 75Assert.Equal(3, newSolution1.Options.GetOption<int>(perLanguageOptionKey)); 79Assert.Equal(1, oldSolution2.Options.GetOption<int>(optionKey)); 80Assert.Equal(1, oldSolution2.Options.GetOption<int>(perLanguageOptionKey)); 85Assert.Equal(2, newSolution2.Options.GetOption<int>(optionKey)); 86Assert.Equal(3, newSolution2.Options.GetOption<int>(perLanguageOptionKey)); 99Assert.Equal(perLanguageOptionKey.Option.DefaultValue, optionSet.GetOption<string>(perLanguageOptionKey)); 102Assert.Equal("EOLN", newSet.GetOption<string>(perLanguageOptionKey)); 105Assert.Equal("EOLN", newSolution1.Options.GetOption<string>(perLanguageOptionKey)); 109Assert.Equal(perLanguageOptionKey.Option.DefaultValue, oldSolution2.Options.GetOption<string>(perLanguageOptionKey)); 113Assert.Equal("EOLN", workspace1.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 114Assert.Equal("EOLN", workspace2.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 120Assert.Equal("EOLN", workspace1.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 121Assert.Equal("EOLN", workspace2.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 128Assert.Equal("NEW_LINE", workspace1.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 129Assert.Equal("NEW_LINE", workspace2.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 134Assert.Equal("NEW_LINE", workspace1.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 135Assert.Equal("NEW_LINE", workspace2.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 139Assert.Equal("NEW_LINE2", workspace1.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 140Assert.Equal("NEW_LINE2", workspace2.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 311Assert.Equal(newPublicValue, newOptionSet.GetOption<CodeStyleOption<bool>>(optionKey));