SourceGeneration\GeneratorDriver.cs (11)
88var newState = _state.With(sourceGenerators: _state.Generators.AddRange(generators),
113return FromState(_state.With(generators, incrementalGenerators, states.ToImmutableAndFree()));
132return FromState(_state.With(sourceGenerators: newGenerators, incrementalGenerators: newIncrementalGenerators, generatorStates: newStates));
137var newState = _state.With(additionalTexts: _state.AdditionalTexts.AddRange(additionalTexts));
143var newState = _state.With(additionalTexts: _state.AdditionalTexts.RemoveRange(additionalTexts));
158var newState = _state.With(additionalTexts: _state.AdditionalTexts.Replace(oldText, newText));
162public GeneratorDriver ReplaceAdditionalTexts(ImmutableArray<AdditionalText> newTexts) => FromState(_state.With(additionalTexts: newTexts));
165? FromState(_state.With(parseOptions: newOptions))
169? FromState(_state.With(optionsProvider: newOptions))
218return _state.With(stateTable: DriverStateTable.Empty, runTime: TimeSpan.Zero);
336state = state.With(stateTable: driverStateBuilder.ToImmutable(), syntaxStore: syntaxStoreBuilder.ToImmutable(), generatorStates: stateBuilder.ToImmutableAndFree(), runTime: timer.Elapsed);