19 instantiations of Section
Microsoft.CodeAnalysis.Workspaces (1)
EditorConfigParser.cs (1)
123var previousSection = new Section(pathToFile, isGlobal, sectionSpan, activeSectionName, fullText);
Microsoft.CodeAnalysis.Workspaces.UnitTests (18)
EditorConfigParsing\EditorConfigFileParserTests.cs (1)
21var section = new Section(editorconfigFilePath, isGlobal, span, headerText, $"[{headerText}]");
EditorConfigParsing\SectionParserTests.cs (17)
20var section = new Section(null, false, default(TextSpan), headerText, $"[{headerText}]"); 30var section = new Section(null, false, default(TextSpan), headerText, $"[{headerText}]"); 39var section = new Section(null, false, default(TextSpan), headerText, $"[{headerText}]"); 49var section = new Section(null, false, default(TextSpan), headerText, $"[{headerText}]"); 59var section = new Section(null, false, default(TextSpan), headerText, $"[{headerText}]"); 69var section = new Section(null, true, default(TextSpan), headerText, $"[{headerText}]"); 79var section = new Section(null, true, default(TextSpan), string.Empty, string.Empty); 92var section = new Section(null, false, default(TextSpan), headerText, $"[{headerText}]"); 103var section = new Section(null, false, default(TextSpan), headerText, $"[{headerText}]"); 112var section = new Section(null, false, default(TextSpan), headerText, $"[{headerText}]"); 121var section = new Section(null, false, default(TextSpan), headerText, $"[{headerText}]"); 135var section = new Section(null, false, default(TextSpan), headerText, $"[{headerText}]"); 152var section = new Section(null, false, default(TextSpan), headerText, $"[{headerText}]"); 187var section = new Section(editorconfigFilePath, false, default(TextSpan), headerText, $"[{headerText}]"); 210var section = new Section(editorconfigFilePath, false, default(TextSpan), headerText, $"[{headerText}]"); 219var section = new Section(editorconfigFilePath, false, default(TextSpan), headerText, $"[{headerText}]"); 230var section = new Section(editorconfigFilePath, false, default(TextSpan), headerText, $"[{headerText}]");
54 references to Section
Microsoft.CodeAnalysis.EditorFeatures (2)
EditorConfigSettings\Updater\NamingStyles\SourceTextExtensions.cs (2)
38if (parseResult.TryGetSectionForLanguage(language, out var existingSection)) 48newNamingStyleSection.Append(Section.GetHeaderTextForLanguage(language));
Microsoft.CodeAnalysis.Workspaces (23)
EditorConfigFile.cs (6)
23private readonly Lazy<ImmutableArray<Section>> _sections = new(() => Options.SelectAsArray(x => x.Section).Distinct()); 25public ImmutableArray<Section> Sections => _sections.Value; 32[NotNullWhen(true)] out Section? sectionResult) 41[NotNullWhen(true)] out Section? sectionResult) 58[NotNullWhen(true)] out Section? sectionResult) 74[NotNullWhen(true)] out Section? sectionResult)
EditorConfigNamingStyleParser_NamingStyle.cs (1)
19Section section,
EditorConfigNamingStyleParser_SymbolSpec.cs (1)
22Section section,
EditorConfigOption.cs (1)
12internal record class EditorConfigOption(Section Section, TextSpan? Span);
EditorConfigOption`1.cs (3)
12internal record class EditorConfigOption<T>(Section Section, TextSpan? Span, T Value) 16public static implicit operator EditorConfigOption<T>((Section section, TextSpan? span, T value) tuple) 18public static implicit operator EditorConfigOption<T>((Section section, T value) tuple)
EditorConfigParser.cs (1)
123var previousSection = new Section(pathToFile, isGlobal, sectionSpan, activeSectionName, fullText);
IEditorConfigOptionAccumulator.cs (1)
15void ProcessSection(Section section, IReadOnlyDictionary<string, (string value, TextLine? line)> properties);
NamingStyleOption.cs (1)
21Section Section,
NamingStyleOptionAccumulator.cs (1)
25public void ProcessSection(Section section, IReadOnlyDictionary<string, (string value, TextLine? line)> properties)
Section.cs (7)
12internal sealed class Section : IEquatable<Section> 170public static bool operator !=(Section left, Section right) 173public static bool operator ==(Section left, Section right) 178=> Equals(obj as Section); 180public bool Equals(Section? other)
Microsoft.CodeAnalysis.Workspaces.UnitTests (29)
EditorConfigParsing\EditorConfigFileParserTests.cs (10)
21var section = new Section(editorconfigFilePath, isGlobal, span, headerText, $"[{headerText}]"); 39Assert.True(parseResults.TryGetSectionForLanguage(Language.CSharp, out var section)); 79Assert.True(parseResults.TryGetSectionForLanguage(Language.CSharp, SectionMatch.ExactLanguageMatchWithOthers, out var section)); 95Assert.True(parseResults.TryGetSectionForLanguage(Language.CSharp, SectionMatch.Any, out var section)); 121Assert.True(parseResults.TryGetSectionForFilePath(@"C:\dev\sources\CSharp\Program.cs", out var section)); 160Assert.True(parseResults.TryGetSectionForFilePath(@"C:\dev\sources\CSharp\Program.cs", SectionMatch.Any, out var section)); 179Assert.True(parseResults.TryGetSectionForFilePath(@"C:\dev\sources\CSharp\Program.cs", SectionMatch.Any, out var section)); 205Assert.True(parseResults.TryGetSectionForFilePath(@"C:\dev\sources\CSharp\Program.cs", SectionMatch.Any, out var section)); 222Assert.True(parseResults.TryGetSectionForFilePath(@"C:\dev\sources\CSharp\Program.cs", SectionMatch.Any, out var section)); 238Assert.True(parseResults.TryGetSectionForFilePath(@"C:\dev\sources\CSharp\Program.cs", SectionMatch.Any, out var section));
EditorConfigParsing\NamingStyleParserTests.cs (2)
22var namingStyleSection = Assert.Single(namingStyles.Sections); 51var namingStyleSection = Assert.Single(namingStyles.Sections);
EditorConfigParsing\SectionParserTests.cs (17)
20var section = new Section(null, false, default(TextSpan), headerText, $"[{headerText}]"); 30var section = new Section(null, false, default(TextSpan), headerText, $"[{headerText}]"); 39var section = new Section(null, false, default(TextSpan), headerText, $"[{headerText}]"); 49var section = new Section(null, false, default(TextSpan), headerText, $"[{headerText}]"); 59var section = new Section(null, false, default(TextSpan), headerText, $"[{headerText}]"); 69var section = new Section(null, true, default(TextSpan), headerText, $"[{headerText}]"); 79var section = new Section(null, true, default(TextSpan), string.Empty, string.Empty); 92var section = new Section(null, false, default(TextSpan), headerText, $"[{headerText}]"); 103var section = new Section(null, false, default(TextSpan), headerText, $"[{headerText}]"); 112var section = new Section(null, false, default(TextSpan), headerText, $"[{headerText}]"); 121var section = new Section(null, false, default(TextSpan), headerText, $"[{headerText}]"); 135var section = new Section(null, false, default(TextSpan), headerText, $"[{headerText}]"); 152var section = new Section(null, false, default(TextSpan), headerText, $"[{headerText}]"); 187var section = new Section(editorconfigFilePath, false, default(TextSpan), headerText, $"[{headerText}]"); 210var section = new Section(editorconfigFilePath, false, default(TextSpan), headerText, $"[{headerText}]"); 219var section = new Section(editorconfigFilePath, false, default(TextSpan), headerText, $"[{headerText}]"); 230var section = new Section(editorconfigFilePath, false, default(TextSpan), headerText, $"[{headerText}]");