SourceGeneration\GeneratorDriver.cs (11)
113var newState = _state.With(sourceGenerators: _state.Generators.AddRange(generators),
138return FromState(_state.With(generators, incrementalGenerators, states.ToImmutableAndFree()));
157return FromState(_state.With(sourceGenerators: newGenerators, incrementalGenerators: newIncrementalGenerators, generatorStates: newStates));
162var newState = _state.With(additionalTexts: _state.AdditionalTexts.AddRange(additionalTexts));
168var newState = _state.With(additionalTexts: _state.AdditionalTexts.RemoveRange(additionalTexts));
183var newState = _state.With(additionalTexts: _state.AdditionalTexts.Replace(oldText, newText));
187public GeneratorDriver ReplaceAdditionalTexts(ImmutableArray<AdditionalText> newTexts) => FromState(_state.With(additionalTexts: newTexts));
190? FromState(_state.With(parseOptions: newOptions))
194? FromState(_state.With(optionsProvider: newOptions))
243return _state.With(stateTable: DriverStateTable.Empty, runTime: TimeSpan.Zero);
361state = state.With(stateTable: driverStateBuilder.ToImmutable(), syntaxStore: syntaxStoreBuilder.ToImmutable(), generatorStates: stateBuilder.ToImmutableAndFree(), runTime: timer.Elapsed);