1 write to _sourcesAdded
Microsoft.CodeAnalysis (1)
SourceGeneration\AdditionalSourcesCollection.cs (1)
32
_sourcesAdded
= ArrayBuilder<GeneratedSourceText>.GetInstance();
14 references to _sourcesAdded
Microsoft.CodeAnalysis (14)
SourceGeneration\AdditionalSourcesCollection.cs (14)
86
_sourcesAdded
.Add(new GeneratedSourceText(hintName, source));
92
for (int i = 0; i <
_sourcesAdded
.Count; i++)
94
if (s_hintNameComparer.Equals(
_sourcesAdded
[i].HintName, hintName))
96
_sourcesAdded
.RemoveAt(i);
105
for (int i = 0; i <
_sourcesAdded
.Count; i++)
107
if (s_hintNameComparer.Equals(
_sourcesAdded
[i].HintName, hintName))
119
if (asc.
_sourcesAdded
.Count == 0)
121
asc.
_sourcesAdded
.AddRange(this.
_sourcesAdded
);
125
foreach (var source in this.
_sourcesAdded
)
131
asc.
_sourcesAdded
.Add(source);
136
internal ImmutableArray<GeneratedSourceText> ToImmutableAndFree() =>
_sourcesAdded
.ToImmutableAndFree();
138
internal ImmutableArray<GeneratedSourceText> ToImmutable() =>
_sourcesAdded
.ToImmutable();
140
internal void Free() =>
_sourcesAdded
.Free();