10 instantiations of IncrementalValueProvider
Microsoft.CodeAnalysis (10)
SourceGeneration\IncrementalContexts.cs (4)
50public IncrementalValueProvider<Compilation> CompilationProvider => new IncrementalValueProvider<Compilation>(SharedInputNodes.Compilation.WithRegisterOutput(RegisterOutput).WithTrackingName(WellKnownGeneratorInputs.Compilation), CatchAnalyzerExceptions); 56=> new(SharedInputNodes.CompilationOptions.WithRegisterOutput(RegisterOutput) 60public IncrementalValueProvider<ParseOptions> ParseOptionsProvider => new IncrementalValueProvider<ParseOptions>(SharedInputNodes.ParseOptions.WithRegisterOutput(RegisterOutput).WithTrackingName(WellKnownGeneratorInputs.ParseOptions), CatchAnalyzerExceptions); 64public IncrementalValueProvider<AnalyzerConfigOptionsProvider> AnalyzerConfigOptionsProvider => new IncrementalValueProvider<AnalyzerConfigOptionsProvider>(SharedInputNodes.AnalyzerConfigOptions.WithRegisterOutput(RegisterOutput).WithTrackingName(WellKnownGeneratorInputs.AnalyzerConfigOptions), CatchAnalyzerExceptions);
SourceGeneration\Nodes\SyntaxValueProvider.cs (1)
60return new IncrementalValueProvider<ISyntaxContextReceiver?>(node, _context.CatchAnalyzerExceptions);
SourceGeneration\Nodes\ValueSourceExtensions.cs (5)
16public static IncrementalValueProvider<TResult> Select<TSource, TResult>(this IncrementalValueProvider<TSource> source, Func<TSource, CancellationToken, TResult> selector) => new IncrementalValueProvider<TResult>(new TransformNode<TSource, TResult>(source.Node, selector, wrapUserFunc: source.CatchAnalyzerExceptions), source.CatchAnalyzerExceptions); 29public static IncrementalValueProvider<ImmutableArray<TSource>> Collect<TSource>(this IncrementalValuesProvider<TSource> source) => new IncrementalValueProvider<ImmutableArray<TSource>>(new BatchNode<TSource>(source.Node), source.CatchAnalyzerExceptions); 33public static IncrementalValueProvider<(TLeft Left, TRight Right)> Combine<TLeft, TRight>(this IncrementalValueProvider<TLeft> provider1, IncrementalValueProvider<TRight> provider2) => new IncrementalValueProvider<(TLeft, TRight)>(new CombineNode<TLeft, TRight>(provider1.Node, provider2.Node), provider1.CatchAnalyzerExceptions); 41public static IncrementalValueProvider<TSource> WithComparer<TSource>(this IncrementalValueProvider<TSource> source, IEqualityComparer<TSource> comparer) => new IncrementalValueProvider<TSource>(source.Node.WithComparer(comparer.WrapUserComparer(source.CatchAnalyzerExceptions)), source.CatchAnalyzerExceptions); 46public static IncrementalValueProvider<TSource> WithTrackingName<TSource>(this IncrementalValueProvider<TSource> source, string name) => new IncrementalValueProvider<TSource>(source.Node.WithTrackingName(name), source.CatchAnalyzerExceptions);
100 references to IncrementalValueProvider
CSharpSyntaxGenerator (1)
SourceGenerator.cs (1)
52var syntaxXmlFiles = context.AdditionalTextsProvider.Where(at => Path.GetFileName(at.Path) == "Syntax.xml").Collect();
Microsoft.AspNetCore.App.SourceGenerators (1)
PublicTopLevelProgramGenerator.cs (1)
20var internalGeneratedProgramClass = context.CompilationProvider
Microsoft.AspNetCore.Http.RequestDelegateGenerator (4)
RequestDelegateGenerator.cs (4)
159var httpVerbs = endpoints 170var endpointHelpers = endpoints 236var helperTypes = endpoints 272var endpointsAndHelpers = interceptorDefinitions.Collect().Combine(endpointHelpers).Combine(httpVerbs).Combine(helperTypes);
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (6)
HubClientProxyGenerator.cs (3)
15var methodDeclaration = context.SyntaxProvider 26var compilationAndMethodDeclaration = context.CompilationProvider.Combine(methodDeclaration); 28var payload = compilationAndMethodDeclaration
HubServerProxyGenerator.cs (3)
15var methodDeclaration = context.SyntaxProvider 26var compilationAndMethodDeclaration = context.CompilationProvider.Combine(methodDeclaration); 28var payload = compilationAndMethodDeclaration
Microsoft.CodeAnalysis (31)
SourceGeneration\GeneratorAdaptor.cs (1)
50var contextBuilderSource = context.CompilationProvider
SourceGeneration\IncrementalContexts.cs (8)
50public IncrementalValueProvider<Compilation> CompilationProvider => new IncrementalValueProvider<Compilation>(SharedInputNodes.Compilation.WithRegisterOutput(RegisterOutput).WithTrackingName(WellKnownGeneratorInputs.Compilation), CatchAnalyzerExceptions); 55internal IncrementalValueProvider<CompilationOptions> CompilationOptionsProvider 60public IncrementalValueProvider<ParseOptions> ParseOptionsProvider => new IncrementalValueProvider<ParseOptions>(SharedInputNodes.ParseOptions.WithRegisterOutput(RegisterOutput).WithTrackingName(WellKnownGeneratorInputs.ParseOptions), CatchAnalyzerExceptions); 64public IncrementalValueProvider<AnalyzerConfigOptionsProvider> AnalyzerConfigOptionsProvider => new IncrementalValueProvider<AnalyzerConfigOptionsProvider>(SharedInputNodes.AnalyzerConfigOptions.WithRegisterOutput(RegisterOutput).WithTrackingName(WellKnownGeneratorInputs.AnalyzerConfigOptions), CatchAnalyzerExceptions); 68public void RegisterSourceOutput<TSource>(IncrementalValueProvider<TSource> source, Action<SourceProductionContext, TSource> action) => RegisterSourceOutput(source.Node, action, IncrementalGeneratorOutputKind.Source, _sourceExtension); 72public void RegisterImplementationSourceOutput<TSource>(IncrementalValueProvider<TSource> source, Action<SourceProductionContext, TSource> action) => RegisterSourceOutput(source.Node, action, IncrementalGeneratorOutputKind.Implementation, _sourceExtension); 79public void RegisterHostOutput<TSource>(IncrementalValueProvider<TSource> source, Action<HostOutputProductionContext, TSource> action) => source.Node.RegisterOutput(new HostOutputNode<TSource>(source.Node, action.WrapUserAction(CatchAnalyzerExceptions))); 135/// Context passed to an incremental generator when it has registered an output via <see cref="IncrementalGeneratorInitializationContext.RegisterSourceOutput{TSource}(IncrementalValueProvider{TSource}, Action{SourceProductionContext, TSource})"/>
SourceGeneration\Nodes\IIncrementalGeneratorOutputNode.cs (3)
37/// A regular source output, registered via <see cref="IncrementalGeneratorInitializationContext.RegisterSourceOutput{TSource}(IncrementalValueProvider{TSource}, Action{SourceProductionContext, TSource})"/> 48/// An Implementation only source output, registered via <see cref="IncrementalGeneratorInitializationContext.RegisterImplementationSourceOutput{TSource}(IncrementalValueProvider{TSource}, Action{SourceProductionContext, TSource})"/> 54/// A host specific output, registered via <see cref="IncrementalGeneratorInitializationContext.RegisterHostOutput{TSource}(IncrementalValueProvider{TSource}, Action{HostOutputProductionContext, TSource})"/>
SourceGeneration\Nodes\SyntaxValueProvider.cs (3)
36/// Creates an <see cref="IncrementalValueProvider{T}"/> that can provide a transform over <see cref="SyntaxNode"/>s 41/// <returns>An <see cref="IncrementalValueProvider{T}"/> that provides the results of the transformation</returns> 55internal IncrementalValueProvider<ISyntaxContextReceiver?> CreateSyntaxReceiverProvider(SyntaxContextReceiverCreator creator)
SourceGeneration\Nodes\SyntaxValueProvider_ForAttributeWithSimpleName.cs (3)
77var collectedGlobalAliasesProvider = individualFileGlobalAliasesProvider 81var allUpGlobalAliasesProvider = collectedGlobalAliasesProvider 87var compilationGlobalAliases = _context.CompilationOptionsProvider.Select(
SourceGeneration\Nodes\ValueSourceExtensions.cs (13)
16public static IncrementalValueProvider<TResult> Select<TSource, TResult>(this IncrementalValueProvider<TSource> source, Func<TSource, CancellationToken, TResult> selector) => new IncrementalValueProvider<TResult>(new TransformNode<TSource, TResult>(source.Node, selector, wrapUserFunc: source.CatchAnalyzerExceptions), source.CatchAnalyzerExceptions); 21public static IncrementalValuesProvider<TResult> SelectMany<TSource, TResult>(this IncrementalValueProvider<TSource> source, Func<TSource, CancellationToken, ImmutableArray<TResult>> selector) => new IncrementalValuesProvider<TResult>(new TransformNode<TSource, TResult>(source.Node, selector, wrapUserFunc: source.CatchAnalyzerExceptions), source.CatchAnalyzerExceptions); 23public static IncrementalValuesProvider<TResult> SelectMany<TSource, TResult>(this IncrementalValueProvider<TSource> source, Func<TSource, CancellationToken, IEnumerable<TResult>> selector) => new IncrementalValuesProvider<TResult>(new TransformNode<TSource, TResult>(source.Node, selector.WrapUserFunctionAsImmutableArray(source.CatchAnalyzerExceptions)), source.CatchAnalyzerExceptions); 29public static IncrementalValueProvider<ImmutableArray<TSource>> Collect<TSource>(this IncrementalValuesProvider<TSource> source) => new IncrementalValueProvider<ImmutableArray<TSource>>(new BatchNode<TSource>(source.Node), source.CatchAnalyzerExceptions); 31public static IncrementalValuesProvider<(TLeft Left, TRight Right)> Combine<TLeft, TRight>(this IncrementalValuesProvider<TLeft> provider1, IncrementalValueProvider<TRight> provider2) => new IncrementalValuesProvider<(TLeft, TRight)>(new CombineNode<TLeft, TRight>(provider1.Node, provider2.Node), provider1.CatchAnalyzerExceptions); 33public static IncrementalValueProvider<(TLeft Left, TRight Right)> Combine<TLeft, TRight>(this IncrementalValueProvider<TLeft> provider1, IncrementalValueProvider<TRight> provider2) => new IncrementalValueProvider<(TLeft, TRight)>(new CombineNode<TLeft, TRight>(provider1.Node, provider2.Node), provider1.CatchAnalyzerExceptions); 41public static IncrementalValueProvider<TSource> WithComparer<TSource>(this IncrementalValueProvider<TSource> source, IEqualityComparer<TSource> comparer) => new IncrementalValueProvider<TSource>(source.Node.WithComparer(comparer.WrapUserComparer(source.CatchAnalyzerExceptions)), source.CatchAnalyzerExceptions); 46public static IncrementalValueProvider<TSource> WithTrackingName<TSource>(this IncrementalValueProvider<TSource> source, string name) => new IncrementalValueProvider<TSource>(source.Node.WithTrackingName(name), source.CatchAnalyzerExceptions);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
CommandLineTests.cs (1)
10407var syntaxTreeInput = ctx.CompilationProvider.Select((c, _) => c.SyntaxTrees.First());
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (25)
SourceGeneration\GeneratorDriverTests.cs (25)
1952var compilationSource = ctx.CompilationProvider.WithComparer(new LambdaComparer<Compilation>((c1, c2) => true, 0)); 1988var compilationSource = ctx.CompilationProvider.Combine(ctx.AdditionalTextsProvider.Collect()) 2115var invokedMethodsProvider = ctx.SyntaxProvider 2250var source = ctx.CompilationProvider; 2251var source2 = ctx.CompilationProvider.Combine(source); 2252var source3 = ctx.CompilationProvider.Combine(source2); 2253var source4 = ctx.CompilationProvider.Combine(source3); 2254var source5 = ctx.CompilationProvider.Combine(source4); 2466var step1 = ctx.CompilationProvider.Select((c, ct) => { generatorCancelled = true; cts.Cancel(); return c; }); 2467var step2 = step1.Select((c, ct) => { ct.ThrowIfCancellationRequested(); return c; }); 2558IncrementalValueProvider<(Compilation, ImmutableArray<ClassDeclarationSyntax>)> compilationAndClasses = 3540var nullArray = ctx.CompilationProvider.Select((c, _) => null as object[]); 3928IncrementalValueProvider<ParseOptions> parseOptionsProvider = default; 3929IncrementalValueProvider<AnalyzerConfigOptionsProvider> configOptionsProvider = default; 3933var source = parseOptionsProvider = ctx.ParseOptionsProvider; 3934var source2 = configOptionsProvider = ctx.AnalyzerConfigOptionsProvider; 3935var combine = source.Combine(source2); 3947var source = parseOptionsProvider; 3948var source2 = configOptionsProvider; 3950var transform = source.Select((a, _) => { wasCalled = true; return new object(); }); 3952var combine = source2.Combine(transform); 3974IncrementalValueProvider<ParseOptions> parseOptionsProvider = default; 3978var source = parseOptionsProvider = ctx.ParseOptionsProvider; 3990var source = parseOptionsProvider; 4200var interceptorInfos = context.SyntaxProvider.CreateSyntaxProvider(
Microsoft.CodeAnalysis.Features.UnitTests (1)
EditAndContinue\CompileTimeSolutionProviderTests.cs (1)
85var isDisabled = context.AnalyzerConfigOptionsProvider.Select(
Microsoft.Extensions.Options.SourceGeneration (1)
Generator.cs (1)
27IncrementalValueProvider<(Compilation, ImmutableArray<(TypeDeclarationSyntax? TypeSyntax, SemanticModel SemanticModel)>)> compilationAndTypes =
Microsoft.Gen.ComplianceReports (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
70var compilationAndTypes = context.CompilationProvider.Combine(declarations.Collect());
Microsoft.Gen.ContextualOptions (2)
ContextualOptionsGenerator.cs (1)
24IncrementalValueProvider<(Compilation, ImmutableArray<SyntaxNode>)> compilationAndTypes =
src\Generators\Shared\GeneratorUtilities.cs (1)
70var compilationAndTypes = context.CompilationProvider.Combine(declarations.Collect());
Microsoft.Gen.Logging (2)
LoggingGenerator.cs (1)
25IncrementalValueProvider<(Compilation, ImmutableArray<TypeDeclarationSyntax>)> compilationAndTypes =
src\Generators\Shared\GeneratorUtilities.cs (1)
70var compilationAndTypes = context.CompilationProvider.Combine(declarations.Collect());
Microsoft.Gen.Metrics (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
70var compilationAndTypes = context.CompilationProvider.Combine(declarations.Collect());
Microsoft.Gen.MetricsReports (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
70var compilationAndTypes = context.CompilationProvider.Combine(declarations.Collect());
Microsoft.Interop.ComInterfaceGenerator (2)
ComClassGenerator.cs (1)
21var unsafeCodeIsEnabled = context.CompilationProvider.Select((comp, ct) => comp.Options is CSharpCompilationOptions { AllowUnsafe: true }); // Unsafe code enabled
ComInterfaceGenerator.cs (1)
46var stubEnvironment = context.CreateStubEnvironmentProvider();
Microsoft.Interop.JavaScript.JSImportGenerator (6)
JSExportGenerator.cs (5)
37var assemblyName = context.CompilationProvider.Select(static (c, _) => c.AssemblyName); 61IncrementalValueProvider<StubEnvironment> stubEnvironment = context.CreateStubEnvironmentProvider(); 95IncrementalValueProvider<ImmutableArray<(StatementSyntax, AttributeListSyntax)>> regSyntax = generateSingleStub 100IncrementalValueProvider<string> registration = regSyntax 105IncrementalValueProvider<ImmutableArray<(string, string)>> generated = generateSingleStub
JSImportGenerator.cs (1)
59IncrementalValueProvider<StubEnvironment> stubEnvironment = context.CreateStubEnvironmentProvider();
Microsoft.Interop.LibraryImportGenerator (2)
LibraryImportGenerator.cs (2)
65IncrementalValueProvider<LibraryImportGeneratorOptions> stubOptions = context.AnalyzerConfigOptionsProvider 68IncrementalValueProvider<StubEnvironment> stubEnvironment = context.CreateStubEnvironmentProvider();
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
DownlevelLibraryImportGenerator.cs (1)
63IncrementalValueProvider<StubEnvironment> stubEnvironment = context.CreateStubEnvironmentProvider();
Microsoft.Interop.SourceGeneration (5)
IncrementalGeneratorInitializationContextExtensions.cs (5)
17public static IncrementalValueProvider<EnvironmentFlags> CreateEnvironmentFlagsProvider(this IncrementalGeneratorInitializationContext context) 19var isModuleSkipLocalsInit = context.SyntaxProvider 30var disabledRuntimeMarshalling = context.SyntaxProvider 45public static IncrementalValueProvider<StubEnvironment> CreateStubEnvironmentProvider(this IncrementalGeneratorInitializationContext context) 72IncrementalValueProvider<ImmutableArray<string>> generatedMethods = nodes
System.Text.RegularExpressions.Generator (1)
RegexGenerator.cs (1)
47IncrementalValueProvider<ImmutableArray<object>> results =
System.Windows.Forms.Analyzers.CSharp (5)
System\Windows\Forms\CSharp\Generators\ApplicationConfiguration\ApplicationConfigurationGenerator.cs (3)
74IncrementalValueProvider<OutputKind> outputKindProvider = context.CompilationProvider.Select((compilation, _) 81IncrementalValueProvider<(ApplicationConfig? ApplicationConfig, Diagnostic? Diagnostic)> globalConfig 84IncrementalValueProvider<(OutputKind OutputKind, Collections.Immutable.ImmutableArray<string?> ProjectNamespaces, ApplicationConfig? ApplicationConfig, Diagnostic? ApplicationConfigDiagnostics)> inputs
System\Windows\Forms\CSharp\Generators\ApplicationConfiguration\ProjectFileReader.cs (2)
14public static IncrementalValueProvider<(ApplicationConfig? ApplicationConfig, Diagnostic? Diagnostic)> ReadApplicationConfig(IncrementalValueProvider<AnalyzerConfigOptionsProvider> configOptionsProvider) =>