12 references to With
Microsoft.CodeAnalysis (12)
SourceGeneration\GeneratorDriver.cs (12)
99var newState = _state.With(sourceGenerators: _state.Generators.AddRange(generators), 124return FromState(_state.With(generators, incrementalGenerators, states.ToImmutableAndFree())); 143return FromState(_state.With(sourceGenerators: newGenerators, incrementalGenerators: newIncrementalGenerators, generatorStates: newStates)); 148var newState = _state.With(additionalTexts: _state.AdditionalTexts.AddRange(additionalTexts)); 154var newState = _state.With(additionalTexts: _state.AdditionalTexts.RemoveRange(additionalTexts)); 169var newState = _state.With(additionalTexts: _state.AdditionalTexts.Replace(oldText, newText)); 173public GeneratorDriver ReplaceAdditionalTexts(ImmutableArray<AdditionalText> newTexts) => FromState(_state.With(additionalTexts: newTexts)); 176? FromState(_state.With(parseOptions: newOptions)) 180? FromState(_state.With(optionsProvider: newOptions)) 236return _state.With(stateTable: DriverStateTable.Empty, runTime: TimeSpan.Zero); 404state = state.With(compilationCache: cacheBuilder.ToImmutableAndFree()); 437state = state.With(stateTable: driverStateBuilder.ToImmutable(), syntaxStore: driverStateBuilder.SyntaxStore.ToImmutable(), generatorStates: stateBuilder.ToImmutableAndFree(), runTime: timer.Elapsed);