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