1 write to Generators
Microsoft.CodeAnalysis (1)
SourceGeneration\GeneratorDriverState.cs (1)
25
Generators
= sourceGenerators;
18 references to Generators
Microsoft.CodeAnalysis (18)
SourceGeneration\GeneratorDriver.cs (15)
33
Debug.Assert(state.
Generators
.GroupBy(s => s.GetGeneratorType()).Count() == state.
Generators
.Length); // ensure we don't have duplicate generator types
88
var newState = _state.With(sourceGenerators: _state.
Generators
.AddRange(generators),
101
var existingIndex = _state.
Generators
.IndexOf(generator);
118
var newGenerators = _state.
Generators
;
174
var results = _state.
Generators
.ZipAsArray(
209
var generatorTimings = _state.
Generators
.ZipAsArray(_state.GeneratorStates, (generator, generatorState) => new GeneratorTimingInfo(generator, generatorState.ElapsedTime));
216
if (_state.
Generators
.IsEmpty)
224
var stateBuilder = ArrayBuilder<GeneratorState>.GetInstance(state.
Generators
.Length);
232
var sourceGenerator = state.
Generators
[i];
315
if (shouldSkipGenerator(state.
Generators
[i]) || generatorState.OutputNodes.Length == 0)
320
using var generatorTimer = CodeAnalysisEventSource.Log.CreateSingleGeneratorRunTimer(state.
Generators
[i], (t) => t.Add(syntaxStoreBuilder.GetRuntimeAdjustment(stateBuilder[i].InputNodes)));
328
stateBuilder[i] = generatorState.WithResults(ParseAdditionalSources(state.
Generators
[i], sources, cancellationToken), generatorDiagnostics, generatorRunStateTable.ExecutedSteps, generatorRunStateTable.OutputSteps, hostOutputs, generatorTimer.Elapsed);
330
catch (UserFunctionException ufe) when (handleGeneratorException(compilation, MessageProvider, state.
Generators
[i], ufe.InnerException, isInit: false))
332
stateBuilder[i] = SetGeneratorException(compilation, MessageProvider, generatorState, state.
Generators
[i], ufe.InnerException, diagnosticsBag, cancellationToken, runTime: generatorTimer.Elapsed);
SourceGeneration\GeneratorDriverState.cs (3)
37
Debug.Assert(
Generators
.Length == GeneratorStates.Length);
54
/// This is the 'internal' representation of the <see cref="
Generators
"/> collection. There is a 1-to-1 mapping
119
sourceGenerators ?? this.
Generators
,