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