32 references to GetOption
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (11)
Completion\CompletionServiceTests.cs (1)
82Assert.Equal(1, options.GetOption(new OptionKey(ThirdPartyOption.Instance, LanguageNames.CSharp)));
Workspaces\WorkspaceTests_EditorFeatures.cs (10)
1466var defaultValue = solution.Options.GetOption(optionKey); 1472var newOptionValue = newSolution.Options.GetOption(optionKey); 1477var currentOptionValue = workspace1.CurrentSolution.Options.GetOption(optionKey); 1482var value2 = workspace2.Options.GetOption(optionKey); 1504Assert.Equal(FormattingOptions2.IndentStyle.Smart, primaryWorkspace.Options.GetOption(optionKey)); 1505Assert.Equal(FormattingOptions2.IndentStyle.Smart, secondaryWorkspace.Options.GetOption(optionKey)); 1517Assert.Equal(FormattingOptions2.IndentStyle.Block, primaryWorkspace.Options.GetOption(optionKey)); 1518Assert.Equal(FormattingOptions2.IndentStyle.Block, secondaryWorkspace.Options.GetOption(optionKey)); 1530Assert.Equal(FormattingOptions2.IndentStyle.Block, primaryWorkspace.Options.GetOption(optionKey)); 1531Assert.Equal(FormattingOptions2.IndentStyle.Block, secondaryWorkspace.Options.GetOption(optionKey));
Microsoft.CodeAnalysis.Workspaces (1)
Options\OptionSet.cs (1)
40=> (T)GetOption(optionKey)!;
Microsoft.CodeAnalysis.Workspaces.UnitTests (20)
Options\DocumentOptionSetTests.cs (13)
82var actualValue = updatedSet.GetOption(optionKey); 115Assert.Equal(newValue, updatedSet.GetOption(optionKey)); 134Assert.True((bool?)set.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInTypes))); 135Assert.True((bool?)set.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInMethods))); 136Assert.False((bool?)set.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInAccessors))); 137Assert.False((bool?)set.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInAnonymousMethods))); 138Assert.False((bool?)set.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInProperties))); 142Assert.True((bool?)updatedSet.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInTypes))); 143Assert.True((bool?)updatedSet.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInMethods))); 144Assert.False((bool?)updatedSet.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInAccessors))); 145Assert.False((bool?)updatedSet.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInAnonymousMethods))); 146Assert.True((bool?)updatedSet.GetOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInProperties))); 171Assert.Equal(newValue, updatedSet.GetOption(optionKey));
WorkspaceServiceTests\GlobalOptionServiceTests.cs (6)
217Assert.True((bool?)optionSet.GetOption(key)); 233Assert.False((bool?)optionSet.GetOption(falseKey)); 236Assert.True((bool?)optionSet.GetOption(trueKey)); 251var isOptionSet = (bool?)new SolutionOptionSet(optionService).GetOption(optionKey); 307Assert.Equal(newPublicValue, newOptionSet.GetOption(optionKey)); 308Assert.IsType<CodeStyleOption<bool>>(newOptionSet.GetOption(optionKey));
WorkspaceTests\WorkspaceTests.cs (1)
202Assert.Equal(value, workspace2.Options.GetOption(new OptionKey(option, language)));