10 instantiations of IncrementalValueProvider
Microsoft.CodeAnalysis (10)
SourceGeneration\IncrementalContexts.cs (4)
60
public IncrementalValueProvider<Compilation> CompilationProvider => new
IncrementalValueProvider
<Compilation>(SharedInputNodes.Compilation.WithRegisterOutput(RegisterOutput).WithTrackingName(WellKnownGeneratorInputs.Compilation), CatchAnalyzerExceptions);
66
=>
new
(SharedInputNodes.CompilationOptions.WithRegisterOutput(RegisterOutput)
74
public IncrementalValueProvider<ParseOptions> ParseOptionsProvider => new
IncrementalValueProvider
<ParseOptions>(SharedInputNodes.ParseOptions.WithRegisterOutput(RegisterOutput).WithTrackingName(WellKnownGeneratorInputs.ParseOptions), CatchAnalyzerExceptions);
87
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)
24
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);
88
public static IncrementalValueProvider<ImmutableArray<TSource>> Collect<TSource>(this IncrementalValuesProvider<TSource> source) => new
IncrementalValueProvider
<ImmutableArray<TSource>>(new BatchNode<TSource>(source.Node), source.CatchAnalyzerExceptions);
110
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);
132
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);
153
public static IncrementalValueProvider<TSource> WithTrackingName<TSource>(this IncrementalValueProvider<TSource> source, string name) => new
IncrementalValueProvider
<TSource>(source.Node.WithTrackingName(name), source.CatchAnalyzerExceptions);
124 references to IncrementalValueProvider
Microsoft.AspNetCore.App.SourceGenerators (1)
PublicTopLevelProgramGenerator.cs (1)
23
var
internalGeneratedProgramClass = context.CompilationProvider.Select(static (compilation, cancellationToken) =>
Microsoft.AspNetCore.OpenApi.SourceGenerators (5)
XmlCommentGenerator.cs (5)
21
var
commentsFromTargetAssembly = context.CompilationProvider
28
var
parsedCommentsFromCompilation = commentsFromTargetAssembly
33
var
groupedAddOpenApiInvocations = context.SyntaxProvider
40
var
generatedCommentsFromCompilation = parsedCommentsFromCompilation
43
var
result = generatedCommentsFromXmlFile.Collect()
Microsoft.CodeAnalysis (54)
SourceGeneration\GeneratorAdaptor.cs (1)
51
var
contextBuilderSource = context.CompilationProvider
SourceGeneration\IncrementalContexts.cs (17)
57
/// Gets an <see cref="
IncrementalValueProvider
{T}"/> that provides access to the <see cref="Compilation"/> being processed.
60
public
IncrementalValueProvider
<Compilation> CompilationProvider => new IncrementalValueProvider<Compilation>(SharedInputNodes.Compilation.WithRegisterOutput(RegisterOutput).WithTrackingName(WellKnownGeneratorInputs.Compilation), CatchAnalyzerExceptions);
65
internal
IncrementalValueProvider
<CompilationOptions> CompilationOptionsProvider
71
/// Gets an <see cref="
IncrementalValueProvider
{T}"/> that provides access to the <see cref="ParseOptions"/> for the compilation.
74
public
IncrementalValueProvider
<ParseOptions> ParseOptionsProvider => new IncrementalValueProvider<ParseOptions>(SharedInputNodes.ParseOptions.WithRegisterOutput(RegisterOutput).WithTrackingName(WellKnownGeneratorInputs.ParseOptions), CatchAnalyzerExceptions);
84
/// Gets an <see cref="
IncrementalValueProvider
{T}"/> that provides access to the <see cref="AnalyzerConfigOptionsProvider"/> for the compilation.
87
public
IncrementalValueProvider
<AnalyzerConfigOptionsProvider> AnalyzerConfigOptionsProvider => new IncrementalValueProvider<AnalyzerConfigOptionsProvider>(SharedInputNodes.AnalyzerConfigOptions.WithRegisterOutput(RegisterOutput).WithTrackingName(WellKnownGeneratorInputs.AnalyzerConfigOptions), CatchAnalyzerExceptions);
100
/// <param name="source">An <see cref="
IncrementalValueProvider
{TSource}"/> that provides the input value</param>
102
public void RegisterSourceOutput<TSource>(
IncrementalValueProvider
<TSource> source, Action<SourceProductionContext, TSource> action) => RegisterSourceOutput(source.Node, action, IncrementalGeneratorOutputKind.Source, _sourceExtension);
119
/// <param name="source">An <see cref="
IncrementalValueProvider
{TSource}"/> that provides the input value</param>
121
public void RegisterImplementationSourceOutput<TSource>(
IncrementalValueProvider
<TSource> source, Action<SourceProductionContext, TSource> action) => RegisterSourceOutput(source.Node, action, IncrementalGeneratorOutputKind.Implementation, _sourceExtension);
149
/// <param name="source">An <see cref="
IncrementalValueProvider
{TSource}"/> that provides the input value</param>
152
public void RegisterHostOutput<TSource>(
IncrementalValueProvider
<TSource> source, Action<HostOutputProductionContext, TSource> action) => source.Node.RegisterOutput(new HostOutputNode<TSource>(source.Node, action.WrapUserAction(CatchAnalyzerExceptions)));
173
/// <param name="source">An <see cref="
IncrementalValueProvider
{TSource}"/> that provides the input value</param>
181
public void RegisterPreCompilationSourceOutput<TSource>(
IncrementalValueProvider
<TSource> source, Action<PreCompilationSourceProductionContext, TSource> action) => RegisterPreCompilationSourceOutput(source.Node, action);
267
/// Context passed to an incremental generator when it has registered an output via <see cref="IncrementalGeneratorInitializationContext.RegisterSourceOutput{TSource}(
IncrementalValueProvider
{TSource}, Action{SourceProductionContext, TSource})"/>
324
/// <see cref="IncrementalGeneratorInitializationContext.RegisterPreCompilationSourceOutput{TSource}(
IncrementalValueProvider
{TSource}, Action{PreCompilationSourceProductionContext, TSource})"/>.
SourceGeneration\Nodes\IIncrementalGeneratorOutputNode.cs (4)
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})"/>
61
/// <see cref="IncrementalGeneratorInitializationContext.RegisterPreCompilationSourceOutput{TSource}(
IncrementalValueProvider
{TSource}, Action{PreCompilationSourceProductionContext, 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 (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>
24
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);
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.
46
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);
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.
57
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);
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>
88
public 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.
99
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);
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>
110
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);
131
/// <returns>A new <see cref="
IncrementalValueProvider
{TSource}"/> that uses the specified comparer</returns>
132
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);
152
/// <returns>A new <see cref="
IncrementalValueProvider
{TSource}"/> with the specified tracking name</returns>
153
public static
IncrementalValueProvider
<TSource> WithTrackingName<TSource>(this
IncrementalValueProvider
<TSource> source, string name) => new IncrementalValueProvider<TSource>(source.Node.WithTrackingName(name), source.CatchAnalyzerExceptions);
Microsoft.CodeAnalysis.Razor.Compiler (17)
SourceGenerators\IncrementalValueProviderExtensions.cs (6)
17
internal static
IncrementalValueProvider
<T> WithLambdaComparer<T>(this
IncrementalValueProvider
<T> source, Func<T?, T?, bool> equal)
43
internal static
IncrementalValueProvider
<TSource> ReportDiagnostics<TSource>(this
IncrementalValueProvider
<(TSource?, Diagnostic?)> source, IncrementalGeneratorInitializationContext context)
57
internal static
IncrementalValueProvider
<TSource> ReportDiagnostics<TSource>(this
IncrementalValueProvider
<(TSource?, ImmutableArray<Diagnostic>)> source, IncrementalGeneratorInitializationContext context)
SourceGenerators\RazorSourceGenerator.cs (11)
40
var
analyzerConfigOptions = context.AnalyzerConfigOptionsProvider;
41
var
parseOptions = context.ParseOptionsProvider;
42
var
compilation = context.CompilationProvider;
46
var
razorSourceGeneratorOptions = analyzerConfigOptions
59
var
hasRazorFiles = sourceItems.Collect()
111
var
declCompilation = generatedDeclarationSyntaxTrees
119
var
tagHelpersFromCompilation = declCompilation
137
var
tagHelpersFromReferences = compilation
242
var
allTagHelpers = tagHelpersFromCompilation
271
var
utf8SupportMap = parsedDocuments
365
var
hostOutputs = csharpDocuments
Microsoft.CodeAnalysis.ResxSourceGenerator (2)
AbstractResxGenerator.cs (2)
39
var
compilationInformation = context.CompilationProvider.Select(
186
var
renameMapping = resourceFilesToGenerateSource
Microsoft.Extensions.Logging.Generators (3)
LoggerMessageGenerator.Roslyn4.0.cs (3)
106
IncrementalValueProvider
<(ImmutableEquatableArray<(LoggerClassSpec LoggerClassSpec, bool HasStringCreate)> Specs, ImmutableArray<Diagnostic> Diagnostics)> collected =
137
IncrementalValueProvider
<ImmutableEquatableArray<(LoggerClassSpec LoggerClassSpec, bool HasStringCreate)>> sourceGenerationSpecs =
147
IncrementalValueProvider
<ImmutableArray<Diagnostic>> diagnosticResults =
Microsoft.Extensions.Options.SourceGeneration (1)
Generator.cs (1)
27
IncrementalValueProvider
<(Compilation, ImmutableArray<(TypeDeclarationSyntax? TypeSyntax, SemanticModel SemanticModel)>)> compilationAndTypes =
Microsoft.Gen.BuildMetadata (2)
BuildMetadataGenerator.cs (1)
21
var
buildPropertiesPipeline = context.AnalyzerConfigOptionsProvider.Select((provider, ct) =>
src\Generators\Shared\GeneratorUtilities.cs (1)
69
var
compilationAndTypes = context.CompilationProvider.Combine(declarations.Collect());
Microsoft.Gen.ComplianceReports (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
69
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)
69
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)
69
var
compilationAndTypes = context.CompilationProvider.Combine(declarations.Collect());
Microsoft.Gen.MetadataExtractor (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
69
var
compilationAndTypes = context.CompilationProvider.Combine(declarations.Collect());
Microsoft.Gen.Metrics (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
69
var
compilationAndTypes = context.CompilationProvider.Combine(declarations.Collect());
Microsoft.Gen.MetricsReports (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
69
var
compilationAndTypes = context.CompilationProvider.Combine(declarations.Collect());
Microsoft.Interop.ComInterfaceGenerator (4)
ComInterfaceGenerator.cs (3)
24
var
stubEnvironment = context.CreateStubEnvironmentProvider();
26
var
attributedInterfaces = context.SyntaxProvider
125
var
comMethodContexts = attributedInterfaces.Select(static (a, ct) => a.MethodContexts);
VtableIndexStubGenerator.cs (1)
119
IncrementalValueProvider
<ImmutableArray<ContainingSyntaxContext>> syntaxContexts = generateStubInformation
Microsoft.Interop.JavaScript.JSImportGenerator (6)
JSExportGenerator.cs (5)
36
var
assemblyName = context.CompilationProvider.Select(static (c, _) => c.AssemblyName);
51
IncrementalValueProvider
<StubEnvironment> stubEnvironment = context.CreateStubEnvironmentProvider();
71
IncrementalValueProvider
<ImmutableArray<(StatementSyntax, AttributeListSyntax)>> regSyntax = generateSingleStub
76
IncrementalValueProvider
<string> registration = regSyntax
81
IncrementalValueProvider
<ImmutableArray<(string, string)>> generated = generateSingleStub
JSImportGenerator.cs (1)
52
IncrementalValueProvider
<StubEnvironment> stubEnvironment = context.CreateStubEnvironmentProvider();
Microsoft.Interop.LibraryImportGenerator (2)
LibraryImportGenerator.cs (2)
55
IncrementalValueProvider
<LibraryImportGeneratorOptions> stubOptions = context.AnalyzerConfigOptionsProvider
58
IncrementalValueProvider
<StubEnvironment> stubEnvironment = context.CreateStubEnvironmentProvider();
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
DownlevelLibraryImportGenerator.cs (1)
87
IncrementalValueProvider
<StubEnvironment> stubEnvironment = context.CreateStubEnvironmentProvider();
Microsoft.Interop.SourceGeneration (5)
IncrementalGeneratorInitializationContextExtensions.cs (5)
13
public static
IncrementalValueProvider
<EnvironmentFlags> CreateEnvironmentFlagsProvider(this IncrementalGeneratorInitializationContext context)
15
var
isModuleSkipLocalsInit = context.SyntaxProvider
26
var
disabledRuntimeMarshalling = context.SyntaxProvider
41
public static
IncrementalValueProvider
<StubEnvironment> CreateStubEnvironmentProvider(this IncrementalGeneratorInitializationContext context)
52
IncrementalValueProvider
<ImmutableArray<string>> generatedMethods = nodes
Microsoft.Maui.Controls.SourceGen (3)
CodeBehindGenerator.cs (3)
57
var
referenceCompilationProvider = initContext.CompilationProvider
61
var
xmlnsDefinitionsProvider = referenceCompilationProvider
65
var
referenceTypeCacheProvider = referenceCompilationProvider
System.Private.CoreLib.Generators (1)
ProductVersionInfoGenerator.cs (1)
15
IncrementalValueProvider
<string?> informationalVersionProvider = context.AnalyzerConfigOptionsProvider.Select((options, _) =>
System.Text.Json.SourceGeneration (1)
JsonSourceGenerator.Roslyn4.0.cs (1)
31
IncrementalValueProvider
<KnownTypeSymbols> knownTypeSymbols = context.CompilationProvider
System.Text.RegularExpressions.Generator (3)
RegexGenerator.cs (3)
54
IncrementalValueProvider
<(ImmutableArray<object> Results, ImmutableArray<Diagnostic> Diagnostics)> collected =
160
IncrementalValueProvider
<ImmutableArray<object>> sourceModel =
322
IncrementalValueProvider
<ImmutableArray<Diagnostic>> diagnosticResults =
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) =>