4 implementations of Definition
Microsoft.CodeAnalysis.Workspaces (4)
Option2.cs (1)
77OptionDefinition IOption2.Definition => Definition;
Options\Option.cs (1)
88OptionDefinition IOption2.Definition => _optionDefinition;
Options\PerLanguageOption.cs (1)
74OptionDefinition IOption2.Definition => _optionDefinition;
PerLanguageOption2.cs (1)
64OptionDefinition IOption2.Definition => Definition;
57 references to Definition
Microsoft.CodeAnalysis.EditorFeatures (3)
EditorConfigSettings\Data\Setting.cs (1)
39public string Category => Key.Option.Definition.Group.Description;
EditorConfigSettings\Updater\SettingsUpdateHelper.cs (2)
62var optionName = option.Definition.ConfigName; 63var optionValue = option.Definition.Serializer.Serialize(value);
Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities (3)
CodeActions\CodeFixVerifierHelper.cs (3)
125Assert.True(optionKey.Option.Definition.IsEditorConfigOption); 133analyzerConfig.AppendLine($"{optionKey.Option.Definition.ConfigName} = {optionKey.Option.Definition.Serializer.Serialize(value)}");
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
Diagnostics\IDEDiagnosticIDConfigurationTests.cs (3)
678foreach (var option in options.OrderBy(o => o.Definition.ConfigName)) 720var optionName = option?.Definition.ConfigName; 721var optionValue = option?.Definition.Serializer.Serialize(option.DefaultValue);
Microsoft.CodeAnalysis.Features (6)
CodeFixes\Configuration\ConfigurationUpdater.cs (3)
368var optionValue = option.Definition.Serializer.Serialize(option.DefaultValue); 369builder.Add((option.Definition.ConfigName, optionValue, option.IsPerLanguage)); 406orderby option.Definition.ConfigName
CodeFixes\Configuration\ConfigureCodeStyle\ConfigureCodeStyleOptionCodeFixProvider.cs (2)
111var optionName = option.Definition.ConfigName; 147var optionValue = option.Definition.Serializer.Serialize(configuredCodeStyleOption);
IDEDiagnosticIdToOptionMappingHelper.cs (1)
89Debug.Assert(options.All(option => option.Definition.IsEditorConfigOption));
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.cs (1)
74e.Option.Definition.Group.Parent == CodeStyleOptionGroups.CodeStyle ||
Microsoft.CodeAnalysis.Workspaces (19)
AnalyzerConfigOptionsExtensions.cs (5)
26Contract.ThrowIfFalse(option.Definition.IsEditorConfigOption); 28if (option.Definition.Type == typeof(NamingStylePreferences)) 39if (analyzerConfigOptions.TryGetValue(option.Definition.ConfigName, out var stringValue)) 44return ((OptionDefinition<T>)option.Definition).Serializer.TryParseValue(stringValue, out value!); 47if (option.Definition.Serializer.TryParse(stringValue, out var objectValue))
Option2.cs (1)
103return Definition == other?.Definition;
Options\DocumentOptionSet.cs (2)
87if (!_configOptions.TryGetValue(internallyDefinedOption.Definition.ConfigName, out var stringValue)) 94return internallyDefinedOption.Definition.Serializer.TryParse(stringValue, out value);
Options\EditorConfig\EditorConfigFileGenerator.cs (3)
60foreach (var optionGrouping in options.GroupBy(o => o.Definition.Group).OrderBy(g => g.Key.Priority)) 70uniqueEntries.Add($"{option.Definition.ConfigName} = {option.Definition.Serializer.Serialize(value)}");
Options\GlobalOptionService.cs (1)
147Debug.Assert(optionKey.Option is IOption2 { Definition.StorageMapping: null });
Options\OptionSet.cs (2)
27if (optionKey.Option is IOption2 { Definition.StorageMapping: { } mapping }) 74if (optionAndLanguage.Option is IOption2 { Definition.StorageMapping: { } mapping })
PerLanguageOption2.cs (1)
90return Definition == other?.Definition;
PublicOptionFactory.cs (4)
132var equals = x.Definition.ConfigName == y.Definition.ConfigName && x.Definition.Group == y.Definition.Group;
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Options\OptionsTestInfo.cs (1)
65var configName = option.Definition.ConfigName;
OptionsCollection.cs (1)
39Debug.Assert(optionKey.Option is IOption2 { Definition.StorageMapping: null });
Microsoft.CodeAnalysis.Workspaces.UnitTests (8)
Options\OptionKeyTests.cs (2)
182Assert.All(FormattingOptions2.Options, o => Assert.True(o.Definition.IsEditorConfigOption)); 185Assert.All(CSharpFormattingOptions2.AllOptions, o => Assert.True(o.Definition.IsEditorConfigOption));
Options\OptionSerializerTests.cs (5)
42var serializer = option.Definition.Serializer; 108var type = option.Definition.Type; 117var serializer = option.Definition.Serializer; 131var serializer = option.Definition.Serializer; 145var serializer = option.Definition.Serializer;
WorkspaceServiceTests\GlobalOptionServiceTests.cs (1)
193}, changedOptions.Select(e => $"{e.Option.Definition.ConfigName}={e.Value}"));
Microsoft.VisualStudio.LanguageServices (3)
Options\VisualStudioOptionPersister.cs (2)
44return VisualStudioOptionStorage.Storages.TryGetValue(optionKey.Option.Definition.ConfigName, out var storage) && TryFetch(storage, optionKey, out value); 58if (!VisualStudioOptionStorage.Storages.TryGetValue(optionKey.Option.Definition.ConfigName, out var storage))
Options\VisualStudioSettingsOptionPersister.cs (1)
86if (_readFallbacks.TryGetValue(optionKey.Option.Definition.ConfigName, out var lazyReadFallback))
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (4)
EditorConfigSettings\DataProvider\DataProviderTests.cs (4)
126optionsWithUI.OrderBy(o => o.Definition.ConfigName), 127dataSnapShot.Select(setting => setting.Key.Option).OrderBy(o => o.Definition.ConfigName)); 195expectedOptions.Select(option => option.Definition.ConfigName).OrderBy(n => n), 196dataSnapShot.Select(item => item.Key.Option.Definition.ConfigName).OrderBy(n => n));
Microsoft.VisualStudio.LanguageServices.Implementation (1)
Options\OptionLogger.cs (1)
30m[ConfigName] = optionKey.Option.Definition.ConfigName;
Microsoft.VisualStudio.LanguageServices.New.IntegrationTests (1)
Options\GlobalOptionsTest.cs (1)
106AssertEx.AreEqual(differentValue, updatedValue, message: $"Option '{option.Definition.ConfigName}' failed to persist to VS settings.");
Roslyn.VisualStudio.DiagnosticsWindow (1)
OptionPages\InternalOptionsControl.cs (1)
148var optionDisplay = option.Definition.ConfigName.Replace('_', ' ') + GetLanguage(languageName) + GetAdditionalText(additional);
Roslyn.VisualStudio.Next.UnitTests (2)
Options\VisualStudioOptionStorageTests.cs (2)
110if (!info.Option.Definition.IsEditorConfigOption) 270.Select(optionTestInfo => optionTestInfo.Option.Definition.Group)