6 implementations of DefaultValue
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Completion\CompletionServiceTests.cs (1)
95public object DefaultValue => 0;
Microsoft.CodeAnalysis.Workspaces (4)
Option2.cs (1)
84object? IOption.DefaultValue => Definition.DefaultValue;
Options\Option.cs (1)
82object? IOption.DefaultValue => this.DefaultValue;
Options\PerLanguageOption.cs (1)
76object? IOption.DefaultValue => this.DefaultValue;
PerLanguageOption2.cs (1)
72object? IOption.DefaultValue => Definition.DefaultValue;
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Options\TestOption.cs (1)
16public object? DefaultValue { get; set; } = 1;
28 references to DefaultValue
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
Diagnostics\IDEDiagnosticIDConfigurationTests.cs (1)
721var optionValue = option?.Definition.Serializer.Serialize(option.DefaultValue);
Options\GlobalOptionsTests.cs (1)
75return (T)OptionsTestHelpers.GetDifferentValue(typeof(T), optionKey.Option.DefaultValue)!;
Microsoft.CodeAnalysis.Features (3)
CodeFixes\Configuration\ConfigurationUpdater.cs (2)
368var optionValue = option.Definition.Serializer.Serialize(option.DefaultValue); 405where option.DefaultValue is ICodeStyleOption
CodeFixes\Configuration\ConfigureCodeStyle\ConfigureCodeStyleOptionCodeFixProvider.cs (1)
112var defaultValue = (ICodeStyleOption?)option.DefaultValue;
Microsoft.CodeAnalysis.Workspaces (6)
Options\EmptyOptionSet.cs (1)
14=> optionKey.Option.DefaultValue;
Options\GlobalOptionService.cs (1)
101return optionKey.Option.DefaultValue;
Options\LegacyWorkspaceOptionService.cs (1)
52return _currentExternallyDefinedOptionValues.TryGetValue(key, out var value) ? value : key.Option.DefaultValue;
PublicOptionFactory.cs (3)
136if (equals && x.DefaultValue is not ICodeStyleOption) 138equals = 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 (5)
Options\OptionSerializerTests.cs (1)
88var defaultValue = option.DefaultValue;
WorkspaceServiceTests\GlobalOptionServiceTests.cs (4)
68Assert.Equal(optionKey.Option.DefaultValue, optionSet.GetOption<int>(optionKey)); 69Assert.Equal(perLanguageOptionKey.Option.DefaultValue, optionSet.GetOption<int>(perLanguageOptionKey)); 101Assert.Equal(perLanguageOptionKey.Option.DefaultValue, optionSet.GetOption<string>(perLanguageOptionKey)); 111Assert.Equal(perLanguageOptionKey.Option.DefaultValue, oldSolution2.Options.GetOption<string>(perLanguageOptionKey));
Microsoft.VisualStudio.IntegrationTest.Utilities (3)
InProcess\VisualStudioWorkspace_InProc.cs (3)
135_globalOptions.SetGlobalOption(new OptionKey2(option, LanguageNames.CSharp), option.DefaultValue); 136_globalOptions.SetGlobalOption(new OptionKey2(option, LanguageNames.VisualBasic), option.DefaultValue); 140_globalOptions.SetGlobalOption(new OptionKey2(option, language: null), option.DefaultValue);
Microsoft.VisualStudio.LanguageServices (7)
Options\FeatureFlagPersister.cs (2)
32if (optionKey.Option.DefaultValue is not bool defaultValue) 34throw ExceptionUtilities.UnexpectedValue(optionKey.Option.DefaultValue);
Options\LocalUserRegistryOptionPersister.cs (4)
63value = subKey.GetValue(key, defaultValue: (bool)optionKey.Option.DefaultValue! ? 1 : 0).Equals(1); 68var untypedValue = subKey.GetValue(key, defaultValue: optionKey.Option.DefaultValue); 87var untypedValue = subKey.GetValue(key, defaultValue: optionKey.Option.DefaultValue); 107value = subKey.GetValue(key, defaultValue: optionKey.Option.DefaultValue);
Options\VisualStudioSettingsOptionPersister.cs (1)
79var result = TryReadAndMonitorOptionValue(optionKey, storageKey, storageKey, optionKey.Option.Type, optionKey.Option.DefaultValue);
Microsoft.VisualStudio.LanguageServices.Implementation (1)
Options\AbstractOptionPreviewViewModel.cs (1)
74if (option.DefaultValue is ICodeStyleOption codeStyleOption)