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