4 instantiations of Section
Microsoft.CodeAnalysis (4)
CommandLine\AnalyzerConfig.cs (1)
269
var previousSection = new
Section
(sectionName, activeSectionProperties.ToImmutable());
CommandLine\AnalyzerConfigSet.cs (3)
497
var unescapedSection = new
Section
(UnescapeSectionName(section.Name), section.Properties);
516
return new GlobalAnalyzerConfig(new
Section
(GlobalSectionName, AnalyzerOptions.Empty), ImmutableArray<Section>.Empty);
558
return new
Section
(sectionName, result);
50 references to Section
Microsoft.CodeAnalysis (50)
CommandLine\AnalyzerConfig.cs (10)
72
= ImmutableHashSet.CreateRange(
Section
.PropertiesKeyComparer, new[] {
90
internal
Section
GlobalSection { get; }
109
internal ImmutableArray<
Section
> NamedSections { get; }
160
Section
globalSection,
161
ImmutableArray<
Section
> namedSections,
194
Section
? globalSection = null;
195
var namedSectionBuilder = ImmutableArray.CreateBuilder<
Section
>();
204
Section
.PropertiesKeyComparer);
231
Section
.PropertiesKeyComparer);
269
var
previousSection = new Section(sectionName, activeSectionProperties.ToImmutable());
CommandLine\AnalyzerConfig.SectionNameMatching.cs (1)
66
/// Takes a <see cref="
Section
.Name"/> and creates a matcher that
CommandLine\AnalyzerConfigSet.cs (38)
51
private readonly ConcurrentCache<List<
Section
>, AnalyzerConfigOptionsResult> _optionsCache =
52
new ConcurrentCache<List<
Section
>, AnalyzerConfigOptionsResult>(50, SequenceEqualComparer.Instance); // arbitrary size
55
new ObjectPool<TreeOptions.Builder>(() => ImmutableDictionary.CreateBuilder<string, ReportDiagnostic>(
Section
.PropertiesKeyComparer));
58
new ObjectPool<AnalyzerOptions.Builder>(() => ImmutableDictionary.CreateBuilder<string, string>(
Section
.PropertiesKeyComparer));
60
private readonly ObjectPool<List<
Section
>> _sectionKeyPool = new ObjectPool<List<
Section
>>(() => new List<
Section
>());
64
private sealed class SequenceEqualComparer : IEqualityComparer<List<
Section
>>
68
public bool Equals(List<
Section
>? x, List<
Section
>? y)
91
public int GetHashCode(List<
Section
> obj) => Hash.CombineValues(obj);
148
foreach (
var
section in config.NamedSections)
192
foreach (
var
section in _globalConfig.NamedSections)
194
if (normalizedPath.Equals(section.Name,
Section
.NameComparer))
232
var
section = config.NamedSections[sectionIndex];
250
foreach (
var
configSection in _globalConfig.NamedSections)
324
static void freeKey(List<
Section
> sectionKey, ObjectPool<List<
Section
>> pool)
395
private static void ParseSectionOptions(
Section
section, TreeOptions.Builder treeBuilder, AnalyzerOptions.Builder analyzerBuilder, ArrayBuilder<Diagnostic> diagnosticBuilder, string analyzerConfigPath, ConcurrentDictionary<ReadOnlyMemory<char>, string> diagIdCache)
487
_values = ImmutableDictionary.CreateBuilder<string, ImmutableDictionary<string, (string, string, int)>.Builder>(
Section
.NameEqualityComparer);
488
_duplicates = ImmutableDictionary.CreateBuilder<string, ImmutableDictionary<string, (int, ArrayBuilder<string>)>.Builder>(
Section
.NameEqualityComparer);
492
foreach (
var
section in config.NamedSections)
497
var
unescapedSection = new Section(UnescapeSectionName(section.Name), section.Properties);
516
return new GlobalAnalyzerConfig(new Section(GlobalSectionName, AnalyzerOptions.Empty), ImmutableArray<
Section
>.Empty);
537
Section
globalSection = GetSection(string.Empty);
540
ArrayBuilder<
Section
> namedSectionBuilder = new ArrayBuilder<
Section
>(_values.Count);
552
private
Section
GetSection(string sectionName)
557
var result = dict.ToImmutableDictionary(d => d.Key, d => d.Value.value,
Section
.PropertiesKeyComparer);
561
private void MergeSection(string configPath,
Section
section, int globalLevel, bool isGlobalSection)
568
sectionDict = ImmutableDictionary.CreateBuilder<string, (string, string, int)>(
Section
.PropertiesKeyComparer);
575
if (isGlobalSection && (
Section
.PropertiesKeyComparer.Equals(key, GlobalKey) ||
Section
.PropertiesKeyComparer.Equals(key, GlobalLevelKey)))
608
duplicateDict = ImmutableDictionary.CreateBuilder<string, (int, ArrayBuilder<string>)>(
Section
.PropertiesKeyComparer);
644
internal AnalyzerConfig.
Section
GlobalSection { get; }
646
internal ImmutableArray<AnalyzerConfig.
Section
> NamedSections { get; }
648
public GlobalAnalyzerConfig(AnalyzerConfig.
Section
globalSection, ImmutableArray<AnalyzerConfig.
Section
> namedSections)
DiagnosticAnalyzer\AnalyzerConfigOptions.cs (1)
17
public static StringComparer KeyComparer { get; } = AnalyzerConfig.
Section
.PropertiesKeyComparer;