6 implementations of DefaultValue
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Completion\CompletionServiceTests.cs (1)
94public object DefaultValue => 0;
Microsoft.CodeAnalysis.Workspaces (4)
Options\Option.cs (1)
82object? IOption.DefaultValue => this.DefaultValue;
Options\PerLanguageOption.cs (1)
76object? IOption.DefaultValue => this.DefaultValue;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\Option2.cs (1)
84object? IOption.DefaultValue => Definition.DefaultValue;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PerLanguageOption2.cs (1)
72object? IOption.DefaultValue => Definition.DefaultValue;
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Options\TestOption.cs (1)
16public object? DefaultValue { get; set; } = 1;
23 references to DefaultValue
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Diagnostics\IDEDiagnosticIDConfigurationTests.cs (1)
760var optionValue = option?.Definition.Serializer.Serialize(option.DefaultValue);
Microsoft.CodeAnalysis.Features (3)
CodeFixes\Configuration\ConfigurationUpdater.cs (2)
356var optionValue = option.Definition.Serializer.Serialize(option.DefaultValue); 388where option.DefaultValue is ICodeStyleOption2
CodeFixes\Configuration\ConfigureCodeStyle\ConfigureCodeStyleOptionCodeFixProvider.cs (1)
111var defaultValue = (ICodeStyleOption2?)option.DefaultValue;
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (7)
Configuration\DidChangeConfigurationNotificationHandlerTest.cs (7)
254=> ConvertToString(option.DefaultValue); 266var defaultValue = (bool)option.DefaultValue!; 271var defaultValue = (int)option.DefaultValue!; 280return GetDifferentEnumValue(type, option.DefaultValue!); 284var defaultValue = (bool?)option.DefaultValue; 295return option.DefaultValue switch 298_ => GetDifferentEnumValue(enumType, option.DefaultValue)
Microsoft.CodeAnalysis.Workspaces (5)
Options\EmptyOptionSet.cs (1)
14=> optionKey.Option.DefaultValue;
Options\GlobalOptionService.cs (1)
93return optionKey.Option.DefaultValue;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Options\PublicOptionFactory.cs (3)
126if (equals && x.DefaultValue is not ICodeStyleOption) 128equals = Equals(x.DefaultValue, y.DefaultValue) && x.Type == y.Type;
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Fakes\TestOptionSet.cs (1)
25=> _values.TryGetValue(optionKey, out var value) ? value : optionKey.Option.DefaultValue;
Microsoft.CodeAnalysis.Workspaces.UnitTests (6)
Options\OptionSerializerTests.cs (2)
78var defaultValue = option.DefaultValue; 130var defaultValue = option.DefaultValue;
WorkspaceServiceTests\GlobalOptionServiceTests.cs (4)
66Assert.Equal(optionKey.Option.DefaultValue, optionSet.GetOption<int>(optionKey)); 67Assert.Equal(perLanguageOptionKey.Option.DefaultValue, optionSet.GetOption<int>(perLanguageOptionKey)); 99Assert.Equal(perLanguageOptionKey.Option.DefaultValue, optionSet.GetOption<string>(perLanguageOptionKey)); 109Assert.Equal(perLanguageOptionKey.Option.DefaultValue, oldSolution2.Options.GetOption<string>(perLanguageOptionKey));