5 instantiations of GeneratorState
Microsoft.CodeAnalysis (5)
SourceGeneration\GeneratorDriver.cs (2)
277
? new
GeneratorState
(postInitSources, inputNodes, outputNodes)
284
generatorState = new
GeneratorState
(reparsedInitSources, generatorState.InputNodes, generatorState.OutputNodes);
SourceGeneration\GeneratorState.cs (3)
21
public static readonly GeneratorState Empty = new
GeneratorState
(ImmutableArray<GeneratedSyntaxTree>.Empty,
81
return new
GeneratorState
(this.PostInitTrees,
95
return new
GeneratorState
(this.PostInitTrees,
17 references to GeneratorState
Microsoft.CodeAnalysis (17)
SourceGeneration\GeneratorDriver.cs (11)
40
_state = new GeneratorDriverState(parseOptions, optionsProvider, generators, incrementalGenerators, additionalTexts, ImmutableArray.Create(new
GeneratorState
[generators.Length]), DriverStateTable.Empty, SyntaxStore.Empty, driverOptions, runtime: TimeSpan.Zero);
74
foreach (
var
generatorState in state.GeneratorStates)
90
generatorStates: _state.GeneratorStates.AddRange(new
GeneratorState
[generators.Length]));
97
var states = ArrayBuilder<
GeneratorState
>.GetInstance(generators.Length);
187
static ImmutableArray<GeneratedSourceResult> getGeneratorSources(
GeneratorState
generatorState)
224
var stateBuilder = ArrayBuilder<
GeneratorState
>.GetInstance(state.Generators.Length);
231
var
generatorState = state.GeneratorStates[i];
278
: SetGeneratorException(compilation, MessageProvider,
GeneratorState
.Empty, sourceGenerator, ex, diagnosticsBag, cancellationToken, isInit: true);
314
var
generatorState = stateBuilder[i];
381
private static
GeneratorState
SetGeneratorException(Compilation compilation, CommonMessageProvider provider,
GeneratorState
generatorState, ISourceGenerator generator, Exception e, DiagnosticBag? diagnosticBag, CancellationToken cancellationToken, TimeSpan? runTime = null, bool isInit = false)
SourceGeneration\GeneratorDriverState.cs (3)
19
ImmutableArray<
GeneratorState
> generatorStates,
66
internal readonly ImmutableArray<
GeneratorState
> GeneratorStates;
108
ImmutableArray<
GeneratorState
>? generatorStates = null,
SourceGeneration\GeneratorState.cs (3)
21
public static readonly
GeneratorState
Empty = new GeneratorState(ImmutableArray<GeneratedSyntaxTree>.Empty,
74
public
GeneratorState
WithResults(ImmutableArray<GeneratedSyntaxTree> generatedTrees,
93
public
GeneratorState
WithError(Exception exception, Diagnostic error, TimeSpan elapsedTime)