10 instantiations of IncrementalValueProvider
Microsoft.CodeAnalysis (10)
SourceGeneration\Nodes\ValueSourceExtensions.cs (5)
24public 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);
88public static IncrementalValueProvider<ImmutableArray<TSource>> Collect<TSource>(this IncrementalValuesProvider<TSource> source) => new IncrementalValueProvider<ImmutableArray<TSource>>(new BatchNode<TSource>(source.Node), source.CatchAnalyzerExceptions);
110public 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);
132public static IncrementalValueProvider<TSource> WithComparer<TSource>(this IncrementalValueProvider<TSource> source, IEqualityComparer<TSource> comparer) => new IncrementalValueProvider<TSource>(source.Node.WithComparer(comparer.WrapUserComparer(source.CatchAnalyzerExceptions)), source.CatchAnalyzerExceptions);
153public static IncrementalValueProvider<TSource> WithTrackingName<TSource>(this IncrementalValueProvider<TSource> source, string name) => new IncrementalValueProvider<TSource>(source.Node.WithTrackingName(name), source.CatchAnalyzerExceptions);
138 references to IncrementalValueProvider
Microsoft.AspNetCore.App.SourceGenerators (1)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (4)
Microsoft.AspNetCore.OpenApi.SourceGenerators (5)
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (6)
Microsoft.CodeAnalysis (50)
SourceGeneration\IncrementalContexts.cs (14)
56/// Gets an <see cref="IncrementalValueProvider{T}"/> that provides access to the <see cref="Compilation"/> being processed.
59public IncrementalValueProvider<Compilation> CompilationProvider => new IncrementalValueProvider<Compilation>(SharedInputNodes.Compilation.WithRegisterOutput(RegisterOutput).WithTrackingName(WellKnownGeneratorInputs.Compilation), CatchAnalyzerExceptions);
64internal IncrementalValueProvider<CompilationOptions> CompilationOptionsProvider
70/// Gets an <see cref="IncrementalValueProvider{T}"/> that provides access to the <see cref="ParseOptions"/> for the compilation.
73public IncrementalValueProvider<ParseOptions> ParseOptionsProvider => new IncrementalValueProvider<ParseOptions>(SharedInputNodes.ParseOptions.WithRegisterOutput(RegisterOutput).WithTrackingName(WellKnownGeneratorInputs.ParseOptions), CatchAnalyzerExceptions);
83/// Gets an <see cref="IncrementalValueProvider{T}"/> that provides access to the <see cref="AnalyzerConfigOptionsProvider"/> for the compilation.
86public IncrementalValueProvider<AnalyzerConfigOptionsProvider> AnalyzerConfigOptionsProvider => new IncrementalValueProvider<AnalyzerConfigOptionsProvider>(SharedInputNodes.AnalyzerConfigOptions.WithRegisterOutput(RegisterOutput).WithTrackingName(WellKnownGeneratorInputs.AnalyzerConfigOptions), CatchAnalyzerExceptions);
99/// <param name="source">An <see cref="IncrementalValueProvider{TSource}"/> that provides the input value</param>
101public void RegisterSourceOutput<TSource>(IncrementalValueProvider<TSource> source, Action<SourceProductionContext, TSource> action) => RegisterSourceOutput(source.Node, action, IncrementalGeneratorOutputKind.Source, _sourceExtension);
118/// <param name="source">An <see cref="IncrementalValueProvider{TSource}"/> that provides the input value</param>
120public void RegisterImplementationSourceOutput<TSource>(IncrementalValueProvider<TSource> source, Action<SourceProductionContext, TSource> action) => RegisterSourceOutput(source.Node, action, IncrementalGeneratorOutputKind.Implementation, _sourceExtension);
148/// <param name="source">An <see cref="IncrementalValueProvider{TSource}"/> that provides the input value</param>
151public void RegisterHostOutput<TSource>(IncrementalValueProvider<TSource> source, Action<HostOutputProductionContext, TSource> action) => source.Node.RegisterOutput(new HostOutputNode<TSource>(source.Node, action.WrapUserAction(CatchAnalyzerExceptions)));
229/// 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\ValueSourceExtensions.cs (26)
16/// Transforms an <see cref="IncrementalValueProvider{TSource}"/> into a new <see cref="IncrementalValueProvider{TResult}"/> by applying a transform function to the value.
23/// <returns>A new <see cref="IncrementalValueProvider{TResult}"/> that provides the transformed value</returns>
24public 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);
38/// Transforms an <see cref="IncrementalValueProvider{TSource}"/> into a new <see cref="IncrementalValuesProvider{TResult}"/> by applying a transform function that returns zero or more results for the input value.
46public 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);
49/// Transforms an <see cref="IncrementalValueProvider{TSource}"/> into a new <see cref="IncrementalValuesProvider{TResult}"/> by applying a transform function that returns zero or more results for the input value.
57public 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);
82/// Collects all values from an <see cref="IncrementalValuesProvider{TSource}"/> into a single <see cref="IncrementalValueProvider{T}"/> containing an <see cref="ImmutableArray{TSource}"/>.
87/// <returns>A new <see cref="IncrementalValueProvider{T}"/> that provides an <see cref="ImmutableArray{TSource}"/> containing all values</returns>
88public static IncrementalValueProvider<ImmutableArray<TSource>> Collect<TSource>(this IncrementalValuesProvider<TSource> source) => new IncrementalValueProvider<ImmutableArray<TSource>>(new BatchNode<TSource>(source.Node), source.CatchAnalyzerExceptions);
91/// Combines an <see cref="IncrementalValuesProvider{TLeft}"/> with an <see cref="IncrementalValueProvider{TRight}"/> to create a new <see cref="IncrementalValuesProvider{T}"/> of tuples.
99public 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);
102/// Combines two <see cref="IncrementalValueProvider{T}"/>s into a new <see cref="IncrementalValueProvider{T}"/> of a tuple.
109/// <returns>A new <see cref="IncrementalValueProvider{T}"/> that provides a tuple of (TLeft, TRight)</returns>
110public 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);
131/// <returns>A new <see cref="IncrementalValueProvider{TSource}"/> that uses the specified comparer</returns>
132public static IncrementalValueProvider<TSource> WithComparer<TSource>(this IncrementalValueProvider<TSource> source, IEqualityComparer<TSource> comparer) => new IncrementalValueProvider<TSource>(source.Node.WithComparer(comparer.WrapUserComparer(source.CatchAnalyzerExceptions)), source.CatchAnalyzerExceptions);
152/// <returns>A new <see cref="IncrementalValueProvider{TSource}"/> with the specified tracking name</returns>
153public 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)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (26)
Microsoft.CodeAnalysis.Features.UnitTests (1)
Microsoft.CodeAnalysis.ResxSourceGenerator (2)
Microsoft.Extensions.Logging.Generators (3)
Microsoft.Extensions.Options.SourceGeneration (1)
Microsoft.Extensions.Validation.ValidationsGenerator (1)
Microsoft.Gen.ComplianceReports (1)
Microsoft.Gen.ContextualOptions (2)
Microsoft.Gen.Logging (2)
Microsoft.Gen.MetadataExtractor (1)
Microsoft.Gen.Metrics (1)
Microsoft.Gen.MetricsReports (1)
Microsoft.Interop.ComInterfaceGenerator (4)
Microsoft.Interop.JavaScript.JSImportGenerator (6)
Microsoft.Interop.LibraryImportGenerator (2)
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
Microsoft.Interop.SourceGeneration (5)
Microsoft.Maui.Controls.SourceGen (3)
System.Private.CoreLib.Generators (1)
System.Text.Json.SourceGeneration (1)
System.Text.RegularExpressions.Generator (1)
System.Windows.Forms.Analyzers.CSharp (5)