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