11 instantiations of IncrementalValuesProvider
Microsoft.CodeAnalysis (11)
SourceGeneration\IncrementalContexts.cs (2)
62public IncrementalValuesProvider<AdditionalText> AdditionalTextsProvider => new IncrementalValuesProvider<AdditionalText>(SharedInputNodes.AdditionalTexts.WithRegisterOutput(RegisterOutput).WithTrackingName(WellKnownGeneratorInputs.AdditionalTexts), CatchAnalyzerExceptions); 66public IncrementalValuesProvider<MetadataReference> MetadataReferencesProvider => new IncrementalValuesProvider<MetadataReference>(SharedInputNodes.MetadataReferences.WithRegisterOutput(RegisterOutput).WithTrackingName(WellKnownGeneratorInputs.MetadataReferences), CatchAnalyzerExceptions);
SourceGeneration\Nodes\SyntaxValueProvider.cs (1)
45return new IncrementalValuesProvider<T>(
SourceGeneration\Nodes\ValueSourceExtensions.cs (8)
18public static IncrementalValuesProvider<TResult> Select<TSource, TResult>(this IncrementalValuesProvider<TSource> source, Func<TSource, CancellationToken, TResult> selector) => new IncrementalValuesProvider<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); 25public static IncrementalValuesProvider<TResult> SelectMany<TSource, TResult>(this IncrementalValuesProvider<TSource> source, Func<TSource, CancellationToken, ImmutableArray<TResult>> selector) => new IncrementalValuesProvider<TResult>(new TransformNode<TSource, TResult>(source.Node, selector, wrapUserFunc: source.CatchAnalyzerExceptions), source.CatchAnalyzerExceptions); 27public static IncrementalValuesProvider<TResult> SelectMany<TSource, TResult>(this IncrementalValuesProvider<TSource> source, Func<TSource, CancellationToken, IEnumerable<TResult>> selector) => new IncrementalValuesProvider<TResult>(new TransformNode<TSource, TResult>(source.Node, selector.WrapUserFunctionAsImmutableArray(source.CatchAnalyzerExceptions)), 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); 43public static IncrementalValuesProvider<TSource> WithComparer<TSource>(this IncrementalValuesProvider<TSource> source, IEqualityComparer<TSource> comparer) => new IncrementalValuesProvider<TSource>(source.Node.WithComparer(comparer.WrapUserComparer(source.CatchAnalyzerExceptions)), source.CatchAnalyzerExceptions); 48public static IncrementalValuesProvider<TSource> WithTrackingName<TSource>(this IncrementalValuesProvider<TSource> source, string name) => new IncrementalValuesProvider<TSource>(source.Node.WithTrackingName(name), source.CatchAnalyzerExceptions);
382 references to IncrementalValuesProvider
IdeCoreBenchmarks (1)
IncrementalSourceGeneratorBenchmarks.cs (1)
128var input = ctx.SyntaxProvider.ForAttributeWithMetadataName(
Microsoft.AspNetCore.Http.RequestDelegateGenerator (5)
RequestDelegateGenerator.cs (3)
22var endpointsWithDiagnostics = context.SyntaxProvider.CreateSyntaxProvider( 50var endpoints = endpointsWithDiagnostics 54var interceptorDefinitions = endpoints
src\Shared\RoslynUtils\IncrementalValuesProviderExtensions.cs (2)
11public static IncrementalValuesProvider<(TSource Source, int Index, ImmutableArray<TElement> Elements)> GroupWith<TSource, TElement>( 12this IncrementalValuesProvider<TSource> source,
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (2)
HubClientProxyGenerator.cs (1)
21var memberAccessExpressions = context.SyntaxProvider
HubServerProxyGenerator.cs (1)
21var memberAccessExpressions = context.SyntaxProvider
Microsoft.CodeAnalysis (38)
SourceGeneration\IncrementalContexts.cs (6)
62public IncrementalValuesProvider<AdditionalText> AdditionalTextsProvider => new IncrementalValuesProvider<AdditionalText>(SharedInputNodes.AdditionalTexts.WithRegisterOutput(RegisterOutput).WithTrackingName(WellKnownGeneratorInputs.AdditionalTexts), CatchAnalyzerExceptions); 66public IncrementalValuesProvider<MetadataReference> MetadataReferencesProvider => new IncrementalValuesProvider<MetadataReference>(SharedInputNodes.MetadataReferences.WithRegisterOutput(RegisterOutput).WithTrackingName(WellKnownGeneratorInputs.MetadataReferences), CatchAnalyzerExceptions); 70public void RegisterSourceOutput<TSource>(IncrementalValuesProvider<TSource> source, Action<SourceProductionContext, TSource> action) => RegisterSourceOutput(source.Node, action, IncrementalGeneratorOutputKind.Source, _sourceExtension); 74public void RegisterImplementationSourceOutput<TSource>(IncrementalValuesProvider<TSource> source, Action<SourceProductionContext, TSource> action) => RegisterSourceOutput(source.Node, action, IncrementalGeneratorOutputKind.Implementation, _sourceExtension); 82public void RegisterHostOutput<TSource>(IncrementalValuesProvider<TSource> source, Action<HostOutputProductionContext, TSource> action) => source.Node.RegisterOutput(new HostOutputNode<TSource>(source.Node, action.WrapUserAction(CatchAnalyzerExceptions))); 211/// Context passed to an incremental generator when it has registered an output via <see cref="IncrementalGeneratorInitializationContext.RegisterHostOutput{TSource}(IncrementalValuesProvider{TSource}, Action{HostOutputProductionContext, TSource})"/>
SourceGeneration\Nodes\IIncrementalGeneratorOutputNode.cs (3)
38/// or <see cref="IncrementalGeneratorInitializationContext.RegisterSourceOutput{TSource}(IncrementalValuesProvider{TSource}, Action{SourceProductionContext, TSource})"/> 49/// or <see cref="IncrementalGeneratorInitializationContext.RegisterImplementationSourceOutput{TSource}(IncrementalValuesProvider{TSource}, Action{SourceProductionContext, TSource})"/> 55/// or <see cref="IncrementalGeneratorInitializationContext.RegisterHostOutput{TSource}(IncrementalValuesProvider{TSource}, Action{HostOutputProductionContext, TSource})"/>
SourceGeneration\Nodes\SyntaxValueProvider.cs (1)
42public IncrementalValuesProvider<T> CreateSyntaxProvider<T>(Func<SyntaxNode, CancellationToken, bool> predicate, Func<GeneratorSyntaxContext, CancellationToken, T> transform)
SourceGeneration\Nodes\SyntaxValueProvider_ForAttributeWithMetadataName.cs (5)
64/// Creates an <see cref="IncrementalValuesProvider{T}"/> that can provide a transform over all <see 78public IncrementalValuesProvider<T> ForAttributeWithMetadataName<T>( 87var nodesWithAttributesMatchingSimpleName = this.ForAttributeWithSimpleName(metadataName.UnmangledTypeName, predicate); 89var compilationAndGroupedNodesProvider = nodesWithAttributesMatchingSimpleName 94var finalProvider = compilationAndGroupedNodesProvider.SelectMany((tuple, cancellationToken) =>
SourceGeneration\Nodes\SyntaxValueProvider_ForAttributeWithSimpleName.cs (4)
55internal IncrementalValuesProvider<(SyntaxTree tree, ImmutableArray<SyntaxNode> matches)> ForAttributeWithSimpleName( 65var syntaxTreesProvider = _context.CompilationProvider 70var individualFileGlobalAliasesProvider = syntaxTreesProvider 102var syntaxTreeAndGlobalAliasesProvider = syntaxTreesProvider
SourceGeneration\Nodes\ValueSourceExtensions.cs (19)
18public static IncrementalValuesProvider<TResult> Select<TSource, TResult>(this IncrementalValuesProvider<TSource> source, Func<TSource, CancellationToken, TResult> selector) => new IncrementalValuesProvider<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); 25public static IncrementalValuesProvider<TResult> SelectMany<TSource, TResult>(this IncrementalValuesProvider<TSource> source, Func<TSource, CancellationToken, ImmutableArray<TResult>> selector) => new IncrementalValuesProvider<TResult>(new TransformNode<TSource, TResult>(source.Node, selector, wrapUserFunc: source.CatchAnalyzerExceptions), source.CatchAnalyzerExceptions); 27public static IncrementalValuesProvider<TResult> SelectMany<TSource, TResult>(this IncrementalValuesProvider<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); 36public static IncrementalValuesProvider<TSource> Where<TSource>(this IncrementalValuesProvider<TSource> source, Func<TSource, bool> predicate) => source.SelectMany((item, _) => predicate(item) ? ImmutableArray.Create(item) : ImmutableArray<TSource>.Empty); 38internal static IncrementalValuesProvider<TSource> Where<TSource>(this IncrementalValuesProvider<TSource> source, Func<TSource, CancellationToken, bool> predicate) => source.SelectMany((item, c) => predicate(item, c) ? ImmutableArray.Create(item) : ImmutableArray<TSource>.Empty); 43public static IncrementalValuesProvider<TSource> WithComparer<TSource>(this IncrementalValuesProvider<TSource> source, IEqualityComparer<TSource> comparer) => new IncrementalValuesProvider<TSource>(source.Node.WithComparer(comparer.WrapUserComparer(source.CatchAnalyzerExceptions)), source.CatchAnalyzerExceptions); 48public static IncrementalValuesProvider<TSource> WithTrackingName<TSource>(this IncrementalValuesProvider<TSource> source, string name) => new IncrementalValuesProvider<TSource>(source.Node.WithTrackingName(name), source.CatchAnalyzerExceptions);
Microsoft.CodeAnalysis.CodeStyle.Fixes (4)
src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (1)
96var locationsInSource = referencedSymbols.Where(symbol => symbol.IsFromSource());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (1)
286var filteredMembers = membersList.Where(m => !m.IsImplicitlyDeclared || m.IsTupleField());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\AbstractRefactoringHelpersService.cs (1)
358var nonHiddenExtractedSelectedNodes = ExtractNodesSimple(selectionNode, syntaxFacts).OfType<TSyntaxNode>().Where(n => !n.OverlapsHiddenPosition(cancellationToken));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (1)
185var annotatedNodes = syntaxNodes.Where(x => x.HasAnnotations(SymbolAnnotation.Kind));
Microsoft.CodeAnalysis.CSharp (1)
Compiler\MethodCompiler.cs (1)
2039var ids = node.DescendantNodes(
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (1)
137var comments = parent.GetLeadingTrivia().Where(t => !t.IsWhitespaceOrEndOfLine());
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (10)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
589var leadingPropTrivia = p.GetLeadingTrivia()
src\Analyzers\CSharp\CodeFixes\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementCodeFixProvider.cs (1)
79var badStatements = descendentStatements.Where(s => EmbeddedStatementPlacementDiagnosticAnalyzer.StatementNeedsWrapping(s));
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
376var trailingWhitespaceAndComments = lastNode.GetTrailingTrivia().Where(static t => t.IsWhitespaceOrSingleOrMultiLineComment());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\CastExpressionSyntaxExtensions.cs (2)
17var leadingTrivia = node.OpenParenToken.LeadingTrivia 26var trailingTrivia = node.GetTrailingTrivia().Where(t => !t.IsElastic());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (5)
43var types = GetTypesSimple(node).Where(IsUsableTypeFunc); 80var types = InferTypeInBinaryOrAssignmentExpression((ExpressionSyntax)node, operatorToken, left, right, left).Where(IsUsableTypeFunc); 1312var addMethodParameterTypes = addMethodSymbols 1365var elementTypes = arrayTypes.OfType<IArrayTypeSymbol>().Select(a => new TypeInferenceInfo(a.ElementType)).Where(IsUsableTypeFunc); 2183var types = CreateResult(type).Where(IsUsableTypeFunc);
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
AutomaticCompletion\AutomaticLineEnderCommandHandler_Helpers.cs (1)
997var trivia = objectCreationNodeWithoutInitializer.GetTrailingTrivia().Where(trivia => trivia.IsSingleOrMultiLineComment());
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (6)
CodeActions\SyncNamespace\CSharpSyncNamespaceTestsBase.cs (1)
114var moveFileActions = actions.Where(a => a is not CodeAction.SolutionChangeAction);
Completion\ArgumentProviders\ArgumentProviderOrderTests.cs (1)
124var csharpArgumentProviders = argumentProviderExports.Where(export => export.Metadata.Language == LanguageNames.CSharp);
Completion\CompletionProviders\CompletionProviderOrderTests.cs (1)
156var csharpCompletionProviders = completionProviderExports.Where(export => export.Metadata.Language == LanguageNames.CSharp);
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (2)
262var diagnosticsFromAnalyzer = diagnostics.Where(d => d.Id == CodeBlockAnalyzerFactory.Descriptor.Id); 281var diagnosticsFromAnalyzer = diagnostics.Where(d => d.Id == CodeBlockAnalyzerFactory.Descriptor.Id);
LineSeparators\LineSeparatorTests.cs (1)
603var tokens = root.DescendantTokens().Where(t => t.Kind() is SyntaxKind.CloseBraceToken or SyntaxKind.SemicolonToken);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
CodeGen\CodeGenOverridingAndHiding.cs (1)
4143var paramArrayAttributes = allAttributes.Where(a => a.AttributeClass.ToTestDisplayString() == "System.ParamArrayAttribute");
Emit\CompilationEmitTests.cs (1)
2732var cciMethods = class1TypeDef.GetMethods(context).Where(m => ((MethodSymbol)m.GetInternalSymbol()).MethodKind != MethodKind.Constructor);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (6)
Attributes\AttributeTests_Assembly.cs (2)
1034var metadataAttributes = module.ContainingAssembly 2247var attrlist = attrs.Where(a => a.IsTargetAttribute(AttributeDescription.AssemblyFileVersionAttribute));
Attributes\AttributeTests_MarshalAs.cs (2)
36var fields = type.GetMembers().Where(s => s.Kind == SymbolKind.Field); 70var methods = type.GetMembers().Where(s => s.Kind == SymbolKind.Method);
Attributes\WellKnownAttributesTestBase.cs (1)
94var paramArrayAttributes = allAttributes.Where(a => a.AttributeClass.ToTestDisplayString() == "System.ParamArrayAttribute");
Semantics\PrimaryConstructorTests.cs (1)
11781var diagnostics = verifier.Diagnostics.Where(d => d.Code is not (int)ErrorCode.HDN_UnusedUsingDirective);
Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests (1)
EndToEndTests.cs (1)
818var input = ctx.SyntaxProvider.ForAttributeWithMetadataName(
Microsoft.CodeAnalysis.CSharp.Features (8)
ChangeSignature\CSharpChangeSignatureService.cs (1)
778var paramNodes = node
ConvertLinq\ConvertForEachToLinqQuery\DefaultConverter.cs (1)
30var identifiersUsedInStatements = ForEachInfo.Identifiers
Debugging\BreakpointResolver.cs (1)
24var members = type.GetMembers()
Formatting\CSharpAccessibilityModifiersNewDocumentFormattingProvider.cs (1)
41var typeDeclarations = root.DescendantNodes().Where(node => syntaxFacts.IsTypeDeclaration(node));
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (1)
457var localFunctionCalls = innermostCommonBlock.DescendantNodes().Where(node => node is InvocationExpressionSyntax invocationExpression &&
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
589var leadingPropTrivia = p.GetLeadingTrivia()
src\Analyzers\CSharp\CodeFixes\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementCodeFixProvider.cs (1)
79var badStatements = descendentStatements.Where(s => EmbeddedStatementPlacementDiagnosticAnalyzer.StatementNeedsWrapping(s));
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
376var trailingWhitespaceAndComments = lastNode.GetTrailingTrivia().Where(static t => t.IsWhitespaceOrSingleOrMultiLineComment());
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (2)
Diagnostics\Suppression\SuppressionTests.cs (1)
476var cs0168Fixes = allFixes.Where(fix => fix.PrimaryDiagnostic.Id == "CS0168");
ExtractClass\ExtractClassTests.cs (1)
3113var availableMembers = originalSymbol.GetMembers().Where(member => MemberAndDestinationValidator.IsMemberValid(member));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (144)
Semantics\OverloadResolutionPerfTests.cs (1)
312var diagnostics = comp.GetDiagnostics().Where(d => d is not { Severity: DiagnosticSeverity.Info, Code: (int)ErrorCode.INF_TooManyBoundLambdas });
SourceGeneration\GeneratorDriverFuzzTests.cs (13)
77public abstract IncrementalValuesProvider<AdditionalText> Apply(IncrementalValuesProvider<AdditionalText> provider); 85public override IncrementalValuesProvider<AdditionalText> Apply(IncrementalValuesProvider<AdditionalText> provider) 124public override IncrementalValuesProvider<AdditionalText> Apply(IncrementalValuesProvider<AdditionalText> provider) 162public override IncrementalValuesProvider<AdditionalText> Apply(IncrementalValuesProvider<AdditionalText> provider) 211public override IncrementalValuesProvider<AdditionalText> Apply(IncrementalValuesProvider<AdditionalText> provider) 244public override IncrementalValuesProvider<AdditionalText> Apply(IncrementalValuesProvider<AdditionalText> provider) => provider; 350var provider = context.AdditionalTextsProvider;
SourceGeneration\GeneratorDriverTests.cs (12)
1501var name = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("Attr") 2177var invokedMethodsProvider = ctx.SyntaxProvider 2274var invokedMethodsProvider = ctx.SyntaxProvider 2393var input = ctx.SyntaxProvider.CreateSyntaxProvider(static (n, _) => n is ClassDeclarationSyntax, (gsc, _) => (ClassDeclarationSyntax)gsc.Node) 2554IncrementalValuesProvider<ClassDeclarationSyntax> classDeclarations = ctx.SyntaxProvider 2892var texts = ctx.AdditionalTextsProvider; 2893var paths = texts.Select((t, _) => t?.Path).WithTrackingName("Path"); 2894var contents = texts.Select((t, ct) => t?.GetText(ct)?.ToString()).WithTrackingName("Content"); 3541var flatArray = nullArray.SelectMany((a, _) => a!); 4014var syntax = ctx.SyntaxProvider.CreateSyntaxProvider((s, _) => true, (s, _) => s.Node); 4031var syntax = ctx.SyntaxProvider.CreateSyntaxProvider((s, _) => true, (s, _) => s.Node); 4052var provider = ctx.SyntaxProvider
SourceGeneration\GeneratorDriverTests_Attributes_FullyQualifiedName.cs (48)
21public static IncrementalValuesProvider<T> ForAttributeWithSimpleName<T>( 30public static IncrementalValuesProvider<T> ForAttributeWithMetadataName<T>( 74var input = ctx.ForAttributeWithMetadataName<ClassDeclarationSyntax>("N1.XAttribute"); 116var input = ctx.ForAttributeWithMetadataName<ClassDeclarationSyntax>(name); 153var input = ctx.ForAttributeWithMetadataName<ClassDeclarationSyntax>("N2.XAttribute"); 183var input = ctx.ForAttributeWithMetadataName<CompilationUnitSyntax>("System.CLSCompliantAttribute"); 213var input = ctx.ForAttributeWithMetadataName<CompilationUnitSyntax>("System.CLSCompliantAttribute"); 240var input = ctx.ForAttributeWithMetadataName<CompilationUnitSyntax>("System.CLSCompliantAttribute"); 267var input = ctx.ForAttributeWithMetadataName<CompilationUnitSyntax>("System.CLSCompliantAttribute"); 295var input = ctx.ForAttributeWithMetadataName<CompilationUnitSyntax>("System.CLSCompliantAttribute"); 326var input = ctx.ForAttributeWithMetadataName<LocalFunctionStatementSyntax>("System.CLSCompliantAttribute"); 362var input = ctx.ForAttributeWithMetadataName<LocalFunctionStatementSyntax>("System.CLSCompliantAttribute"); 401var input = ctx.ForAttributeWithMetadataName<LocalFunctionStatementSyntax>("System.CLSCompliantAttribute"); 430var input = ctx.ForAttributeWithMetadataName<TypeParameterSyntax>("System.CLSCompliantAttribute"); 463var input = ctx.ForAttributeWithMetadataName<MethodDeclarationSyntax>("System.CLSCompliantAttribute"); 496var input = ctx.ForAttributeWithMetadataName<MethodDeclarationSyntax>("System.CLSCompliantAttribute"); 528var input = ctx.ForAttributeWithMetadataName<MethodDeclarationSyntax>("System.CLSCompliantAttribute"); 560var input = ctx.ForAttributeWithMetadataName<MethodDeclarationSyntax>("System.CLSCompliantAttribute"); 591var input = ctx.ForAttributeWithMetadataName<VariableDeclaratorSyntax>("System.CLSCompliantAttribute"); 622var input = ctx.ForAttributeWithMetadataName<VariableDeclaratorSyntax>("System.CLSCompliantAttribute"); 655var input = ctx.ForAttributeWithMetadataName<VariableDeclaratorSyntax>("System.CLSCompliantAttribute"); 686var input = ctx.ForAttributeWithMetadataName<VariableDeclaratorSyntax>("System.CLSCompliantAttribute"); 715var input = ctx.ForAttributeWithMetadataName<LambdaExpressionSyntax>("System.CLSCompliantAttribute"); 749var input = ctx.ForAttributeWithMetadataName<AccessorDeclarationSyntax>("System.CLSCompliantAttribute"); 778var input = ctx.ForAttributeWithMetadataName<TypeParameterSyntax>("System.CLSCompliantAttribute"); 815var input = ctx.ForAttributeWithMetadataName<ClassDeclarationSyntax>("Outer1+InnerAttribute"); 852var input = ctx.ForAttributeWithMetadataName<ClassDeclarationSyntax>("Outer2+InnerAttribute"); 889var input = ctx.ForAttributeWithMetadataName<ClassDeclarationSyntax>("Outer1+InnerAttribute`1"); 926var input = ctx.ForAttributeWithMetadataName<ClassDeclarationSyntax>("Outer2+InnerAttribute`2"); 963var input = ctx.ForAttributeWithMetadataName<ClassDeclarationSyntax>("Outer1+InnerAttribute`2"); 999var input = ctx.ForAttributeWithMetadataName<ClassDeclarationSyntax>("Outer2+InnerAttribute`1"); 1027var input = ctx.SyntaxProvider.ForAttributeWithMetadataName<ClassDeclarationSyntax>( 1064var input = ctx.SyntaxProvider.ForAttributeWithMetadataName<ClassDeclarationSyntax>( 1102var input = ctx.SyntaxProvider.ForAttributeWithMetadataName<ClassDeclarationSyntax>( 1140var input = ctx.SyntaxProvider.ForAttributeWithMetadataName<ClassDeclarationSyntax>( 1178var input = ctx.SyntaxProvider.ForAttributeWithMetadataName<ClassDeclarationSyntax>( 1216var input = ctx.SyntaxProvider.ForAttributeWithMetadataName<ClassDeclarationSyntax>( 1244var provider = ctx.ForAttributeWithMetadataName<ClassDeclarationSyntax>("GenerateAttribute"); 1336var input = ctx.ForAttributeWithMetadataName<MethodDeclarationSyntax>("System.Runtime.InteropServices.LibraryImportAttribute"); 1382var input = ctx.ForAttributeWithMetadataName<MethodDeclarationSyntax>("System.Runtime.InteropServices.LibraryImportAttribute"); 1420var input = ctx.ForAttributeWithMetadataName<ClassDeclarationSyntax>("XAttribute"); 1467var input = ctx.ForAttributeWithMetadataName<ClassDeclarationSyntax>("XAttribute"); 1514var input = ctx.ForAttributeWithMetadataName<ClassDeclarationSyntax>("XAttribute"); 1557var input = ctx.ForAttributeWithMetadataName<ClassDeclarationSyntax>("XAttribute"); 1605var input = ctx.ForAttributeWithMetadataName<ClassDeclarationSyntax>("XAttribute"); 1658var input = ctx.ForAttributeWithMetadataName<ClassDeclarationSyntax>("XAttribute"); 1717var input = ctx.ForAttributeWithMetadataName<ClassDeclarationSyntax>("XAttribute"); 1769var input = ctx.ForAttributeWithMetadataName<ClassDeclarationSyntax>("XAttribute");
SourceGeneration\GeneratorDriverTests_Attributes_SimpleName.cs (46)
45var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 77var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 103var input = ctx.ForAttributeWithSimpleName<DelegateDeclarationSyntax>("XAttribute"); 128var input = ctx.ForAttributeWithSimpleName<DelegateDeclarationSyntax>("YAttribute"); 153var input = ctx.ForAttributeWithSimpleName<SyntaxNode>("XAttribute"); 181var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 213var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 245var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 279var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 312var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 338var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 364var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("X"); 390var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 423var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 451var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 479var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 506var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 537var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 570var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 602var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 634var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 662var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 690var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 718var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 745var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 772var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 801var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 832var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 862var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 891var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 919var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 947var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 976var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 1008var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 1048var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 1094var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 1147var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 1198var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 1253var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 1306var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 1364var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 1412var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 1457var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 1508var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 1559var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute"); 1620var input = ctx.ForAttributeWithSimpleName<ClassDeclarationSyntax>("XAttribute");
SourceGeneration\SyntaxAwareGeneratorTests.cs (24)
857var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText); 897var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText); 903var source2 = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is ClassDeclarationSyntax fds, (c, _) => ((ClassDeclarationSyntax)c.Node).Identifier.ValueText); 940var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => 1016var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText).WithTrackingName("Fields"); 1091var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText).WithTrackingName("Fields"); 1172var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText); 1180var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText); 1223var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText).WithTrackingName("Fields"); 1306var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText).WithTrackingName("Fields"); 1384var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => 1515var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => ((FieldDeclarationSyntax)c.Node).Declaration.Variables[0].Identifier.ValueText); 1572var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => 1623var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => 1634var comparerSource = source.WithComparer(new LambdaComparer<string>((a, b) => true)); 1680var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => 1739var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => 1744var source2 = source.Combine(context.AdditionalTextsProvider.Collect()) 1792var source = context.SyntaxProvider.CreateSyntaxProvider((c, _) => c is FieldDeclarationSyntax fds, (c, _) => 1797var comparerSource = source.WithComparer(new LambdaComparer<string>((a, b) => false)); 1800var joinedSource = source.Combine(comparerSource.Collect()); 1991var step1 = ctx.SyntaxProvider.CreateSyntaxProvider((c, ct) => { filterCalled++; if (c is AssignmentExpressionSyntax) cts.Cancel(); return true; }, (a, _) => a); 2017var step1 = ctx.SyntaxProvider.CreateSyntaxProvider((c, ct) => { generatorCancelled = true; cts.Cancel(); return true; }, (a, _) => a); 2020var step2 = ctx.SyntaxProvider.CreateSyntaxProvider((c, ct) => { return true; }, (a, _) => a);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Symbols\AccessorOverriddenOrHiddenMembersTests.cs (1)
878var mems = tsym.GetMembers().Where(s => s.Kind == SymbolKind.Method);
Symbols\ConversionTests.cs (1)
2063var conversionSymbols = destinationType.GetMembers().OfType<IMethodSymbol>().Where(m => m.MethodKind == MethodKind.Conversion);
Microsoft.CodeAnalysis.CSharp.Workspaces (9)
Rename\CSharpRenameRewriterLanguageService.cs (1)
760var relevantLocals = newReferencedSymbols
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (1)
137var comments = parent.GetLeadingTrivia().Where(t => !t.IsWhitespaceOrEndOfLine());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\CastExpressionSyntaxExtensions.cs (2)
17var leadingTrivia = node.OpenParenToken.LeadingTrivia 26var trailingTrivia = node.GetTrailingTrivia().Where(t => !t.IsElastic());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (5)
43var types = GetTypesSimple(node).Where(IsUsableTypeFunc); 80var types = InferTypeInBinaryOrAssignmentExpression((ExpressionSyntax)node, operatorToken, left, right, left).Where(IsUsableTypeFunc); 1312var addMethodParameterTypes = addMethodSymbols 1365var elementTypes = arrayTypes.OfType<IArrayTypeSymbol>().Select(a => new TypeInferenceInfo(a.ElementType)).Where(IsUsableTypeFunc); 2183var types = CreateResult(type).Where(IsUsableTypeFunc);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
PullMemberUp\TestPullMemberUpService.cs (1)
32var members = containingType.GetMembers().Where(member => MemberAndDestinationValidator.IsMemberValid(member));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
CodeFixes\CodeFixServiceTests.cs (2)
747var nugetFixerRegisteredActions = fixes.Where(f => f.Action.Title == nameof(NuGetCodeFixProvider)); 751var vsixFixerRegisteredActions = fixes.Where(f => f.Action.Title == nameof(VsixCodeFixProvider));
Diagnostics\DiagnosticAnalyzerServiceTests.cs (1)
467var applicableDiagnostics = diagnostics.Where(
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
EvaluationContextBase.cs (1)
60var errors = diagnostics.AsEnumerable().Where(d => d.Severity == DiagnosticSeverity.Error);
Microsoft.CodeAnalysis.ExternalAccess.RazorCompiler (1)
GeneratorExtensions.cs (1)
21public static void RegisterHostOutput<TSource>(ref this IncrementalGeneratorInitializationContext @this, IncrementalValuesProvider<TSource> source, Action<HostProductionContext, TSource, CancellationToken> action)
Microsoft.CodeAnalysis.Features (19)
BraceMatching\BraceMatchingService.cs (1)
34var matchers = _braceMatchers.Where(b => b.Metadata.Language == document.Project.Language);
ChangeSignature\AbstractChangeSignatureService.cs (2)
939var sourceSymbols = recommendations.Where(r => r.IsNonImplicitAndFromSource()); 949var orderedPropertiesAndFields = sourceSymbols
ChangeSignature\DelegateInvokeMethodReferenceFinder.cs (1)
98var invocations = nodes.Where(syntaxFacts.IsInvocationExpression)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.cs (1)
310var containedDecls = decls.Where(d => span.Contains(d.DeclaredNode.Span));
CodeFixes\Suppression\WrapperCodeFixProvider.cs (1)
23var diagnostics = context.Diagnostics.Where(SuppressionFixProvider.IsFixableDiagnostic);
Completion\Providers\AbstractObjectInitializerCompletionProvider.cs (2)
46var members = semanticModel 52var uninitializedMembers = members.Where(m => !alreadyTypedMembers.Contains(m.Name));
Completion\Providers\AbstractPartialMethodCompletionProvider.cs (1)
95var symbols = semanticModel.LookupSymbols(position, container: enclosingSymbol)
Completion\Providers\ImportCompletionProvider\AbstractTypeImportCompletionService.cs (1)
78var referencedProjects = graph.GetProjectsThatThisProjectTransitivelyDependsOn(currentProject.Id).Select(solution.GetRequiredProject).Where(p => p.SupportsCompilation);
ConvertAnonymousType\AbstractConvertAnonymousTypeToTupleCodeRefactoringProvider.cs (1)
86var childCreationNodes = containingMember.DescendantNodesAndSelf()
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Rewriting.cs (1)
53var nodesToRemove = sections.Skip(1).Select(s => s.SyntaxToRemove).Where(s => s.Parent == ifStatement.Parent);
ExtractClass\ExtractClassWithDialogCodeAction.cs (1)
170var memberAnalysisForDocumentSymbols = remainingResults.Where(analysis => symbols.Contains(analysis.Member));
ExtractMethod\MethodExtractor.Analyzer.cs (1)
103var localFunctionCallsNotWithinSpan = symbolMap.Keys.Where(s => s.IsLocalFunction() && !s.Locations.Any(static (l, self) => self.SelectionResult.FinalSpan.Contains(l.SourceSpan), this));
IntroduceVariable\AbstractIntroduceVariableService.cs (1)
440var anonymousMethodParameters = semanticMap.AllReferencedSymbols
Navigation\NavigableItemFactory.cs (1)
61var visibleSourceLocations = locations.Where(loc => loc.IsVisibleSourceLocation());
Shared\Utilities\ExtractTypeHelpers.cs (1)
82var namespaceParts = namespaceWithoutRoot.Split('.').Where(s => !string.IsNullOrEmpty(s));
src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
174var typeDeclarations = syntaxFacts.GetMembersOfBaseNamespaceDeclaration(namespaceDeclaration)
src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (1)
96var locationsInSource = referencedSymbols.Where(symbol => symbol.IsFromSource());
Microsoft.CodeAnalysis.Features.UnitTests (1)
EditAndContinue\CompileTimeSolutionProviderTests.cs (1)
88var sources = context.AdditionalTextsProvider.Combine(isDisabled).Select((pair, ct) =>
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Handler\CodeLens\CodeLensHandler.cs (1)
135var testContainerMembers = members.Where(member => testContainerNodes.Contains(member.Node));
Handler\SemanticTokens\SemanticTokensHelpers.cs (1)
145var nonEmptySpans = spans.Where(s => !s.TextSpan.IsEmpty && s.ClassificationType != ClassificationTypeNames.Text);
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (3)
CodeLens\AbstractCodeLensTests.cs (2)
42var matchingCodeLenses = actualCodeLenses.Where(actualCodeLens => actualCodeLens.Range == expectedCodeLens.Range); 69var matchingCodeLenses = actualCodeLenses
InlayHint\AbstractInlayHintTests.cs (1)
46var matchingInlayHints = actualInlayHints.Where(actualInlayHints => actualInlayHints.Position == location.Range.Start);
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
SourceGeneration\GeneratorDriverTests_Attributes_FullyQualifiedName.vb (2)
17context As IncrementalGeneratorInitializationContext, simpleName As String) As IncrementalValuesProvider(Of T) 26context As IncrementalGeneratorInitializationContext, fullyQualifiedMetadataName As String) As IncrementalValuesProvider(Of T)
Microsoft.CodeAnalysis.Workspaces (3)
FindSymbols\FindReferences\Finders\PropertySymbolReferenceFinder.cs (1)
205var indexerReferenceExpressions = state.Root.DescendantNodes(descendIntoTrivia: true)
Shared\Utilities\EditorBrowsableHelpers.cs (2)
42var candidateConstructors = editorBrowsableAttributeType.Constructors 107var candidateConstructors = typeLibAttributeType.Constructors
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
NewlyCreatedProjectsFromDotNetNew.cs (1)
242var filteredDiagnostics = nonHiddenDiagnostics
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
SolutionTests\SolutionTests.cs (1)
2951var foundSymbol = from symbol in namespacesAndTypes
Microsoft.Extensions.Options.SourceGeneration (1)
Generator.cs (1)
20IncrementalValuesProvider<(TypeDeclarationSyntax? TypeSyntax, SemanticModel SemanticModel)> typeDeclarations = context.SyntaxProvider
Microsoft.Gen.ComplianceReports (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
63var declarations = context.SyntaxProvider
Microsoft.Gen.ContextualOptions (2)
ContextualOptionsGenerator.cs (1)
18IncrementalValuesProvider<SyntaxNode> typeDeclarations = context.SyntaxProvider
src\Generators\Shared\GeneratorUtilities.cs (1)
63var declarations = context.SyntaxProvider
Microsoft.Gen.Logging (2)
LoggingGenerator.cs (1)
19IncrementalValuesProvider<TypeDeclarationSyntax> typeDeclarations = context.SyntaxProvider
src\Generators\Shared\GeneratorUtilities.cs (1)
63var declarations = context.SyntaxProvider
Microsoft.Gen.Metrics (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
63var declarations = context.SyntaxProvider
Microsoft.Gen.MetricsReports (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
63var declarations = context.SyntaxProvider
Microsoft.Interop.ComInterfaceGenerator (25)
ComClassGenerator.cs (5)
23var attributedClassesOrDiagnostics = context.SyntaxProvider 38var attributedClasses = context.FilterAndReportDiagnostics(attributedClassesOrDiagnostics); 40var className = attributedClasses.Select(static (info, ct) => info.ClassName); 42var classInfoType = attributedClasses 46var attribute = attributedClasses
ComInterfaceGenerator.cs (10)
37var attributedInterfaces = context.SyntaxProvider 47var interfaceSymbolOrDiagnostics = attributedInterfaces.Combine(stubEnvironment).Select(static (data, ct) => 53var externalInterfaceSymbols = attributedInterfaces.SelectMany(static (data, ct) => 58var interfaceSymbolsWithoutDiagnostics = interfaceSymbolsToGenerateWithoutDiagnostics.Concat(externalInterfaceSymbols); 118var managedToNativeInterfaceImplementations = interfaceAndMethodsContexts 125var nativeToManagedVtableMethods = interfaceAndMethodsContexts 137var nativeInterfaceInformation = interfaceContextsToGenerate 144var shadowingMethodDeclarations = interfaceAndMethodsContexts 161var nativeToManagedVtables = interfaceAndMethodsContexts 167var iUnknownDerivedAttributeApplication = interfaceContextsToGenerate
VtableIndexStubGenerator.cs (10)
38var attributedMethods = context.SyntaxProvider 48var methodsWithDiagnostics = attributedMethods.Select(static (data, ct) => 55var methodsToGenerate = methodsWithDiagnostics.Where(static data => data.Diagnostic is null); 56var invalidMethodDiagnostics = methodsWithDiagnostics.Where(static data => data.Diagnostic is not null); 65IncrementalValuesProvider<IncrementalMethodStubGenerationContext> generateStubInformation = methodsToGenerate 79IncrementalValuesProvider<(MemberDeclarationSyntax, ImmutableArray<DiagnosticInfo>)> generateManagedToNativeStub = generateStubInformation 92IncrementalValuesProvider<IncrementalMethodStubGenerationContext> nativeToManagedStubContexts = 97IncrementalValuesProvider<(MemberDeclarationSyntax, ImmutableArray<DiagnosticInfo>)> generateNativeToManagedStub = nativeToManagedStubContexts 109IncrementalValuesProvider<MemberDeclarationSyntax> generateNativeInterface = generateStubInformation 120IncrementalValuesProvider<MemberDeclarationSyntax> populateVTable =
Microsoft.Interop.JavaScript.JSImportGenerator (10)
JSExportGenerator.cs (5)
40var attributedMethods = context.SyntaxProvider 46var methodsWithDiagnostics = attributedMethods.Select(static (data, ct) => 52var methodsToGenerate = methodsWithDiagnostics.Where(static data => data.Diagnostic is null); 53var invalidMethodDiagnostics = methodsWithDiagnostics.Where(static data => data.Diagnostic is not null); 75IncrementalValuesProvider<(MemberDeclarationSyntax, StatementSyntax, AttributeListSyntax, ImmutableArray<DiagnosticInfo>)> generateSingleStub = methodsToGenerate
JSImportGenerator.cs (5)
38var attributedMethods = context.SyntaxProvider 44var methodsWithDiagnostics = attributedMethods.Select(static (data, ct) => 50var methodsToGenerate = methodsWithDiagnostics.Where(static data => data.Diagnostic is null); 51var invalidMethodDiagnostics = methodsWithDiagnostics.Where(static data => data.Diagnostic is not null); 73IncrementalValuesProvider<(MemberDeclarationSyntax, ImmutableArray<DiagnosticInfo>)> generateSingleStub = methodsToGenerate
Microsoft.Interop.LibraryImportGenerator (4)
LibraryImportGenerator.cs (4)
43var attributedMethods = context.SyntaxProvider 54var methodsWithDiagnostics = attributedMethods.Select(static (data, ct) => 62var methodsToGenerate = context.FilterAndReportDiagnostics(methodsWithDiagnostics); 86IncrementalValuesProvider<(MemberDeclarationSyntax, ImmutableArray<DiagnosticInfo>)> generateSingleStub = methodsToGenerate
Microsoft.Interop.LibraryImportGenerator.Downlevel (4)
DownlevelLibraryImportGenerator.cs (4)
42var attributedMethods = context.SyntaxProvider 53var methodsWithDiagnostics = attributedMethods.Select(static (data, ct) => 61var methodsToGenerate = context.FilterAndReportDiagnostics(methodsWithDiagnostics); 65IncrementalValuesProvider<(MemberDeclarationSyntax, ImmutableArray<DiagnosticInfo>)> generateSingleStub = methodsToGenerate
Microsoft.Interop.SourceGeneration (39)
DiagnosticOr.cs (25)
119public static (IncrementalValuesProvider<T>, IncrementalValuesProvider<DiagnosticInfo>) Split<T>(this IncrementalValuesProvider<DiagnosticOr<T>> provider) 121var values = provider.Where(x => x.HasValue).Select(static (x, ct) => x.Value); 122var diagnostics = provider.Where(x => x.HasDiagnostic).SelectMany(static (x, ct) => x.Diagnostics); 129public static (IncrementalValuesProvider<SequenceEqualImmutableArray<T>>, IncrementalValuesProvider<DiagnosticInfo>) SplitArrays<T>(this IncrementalValuesProvider<SequenceEqualImmutableArray<DiagnosticOr<T>>> provider) 131var values = provider.Select((arr, ct) => arr.Where(x => x.HasValue).Select((x, ct) => x.Value).ToSequenceEqualImmutableArray()); 132var diagnostics = provider.SelectMany((arr, ct) => arr.Where(x => x.HasDiagnostic).SelectMany((x, ct) => x.Diagnostics)); 139public static (IncrementalValuesProvider<(T, T2)>, IncrementalValuesProvider<DiagnosticInfo>) Split<T, T2>(this IncrementalValuesProvider<(DiagnosticOr<T>, T2)> provider) 141var values = provider.Where(x => x.Item1.HasValue).Select(static (x, ct) => (x.Item1.Value, x.Item2)); 142var diagnostics = provider.Where(x => x.Item1.HasDiagnostic).SelectMany(static (x, ct) => x.Item1.Diagnostics); 147/// Filters the <see cref="IncrementalValuesProvider{TValue}"/> by whether or not the is a <see cref="Diagnostic"/>, reports the diagnostics, and returns the values. 149public static IncrementalValuesProvider<T> FilterAndReportDiagnostics<T>(this IncrementalGeneratorInitializationContext ctx, IncrementalValuesProvider<DiagnosticOr<T>> diagnosticOrValues) 157/// Filters both <see cref="IncrementalValuesProvider{TValue}"/> by whether or not the value in <paramref name="diagnosticOrValues"/> is a <see cref="Diagnostic"/>, reports the diagnostics, and returns the values. 159public static (IncrementalValuesProvider<T>, IncrementalValuesProvider<T2>) FilterAndReportDiagnostics<T, T2>( 161IncrementalValuesProvider<DiagnosticOr<T>> diagnosticOrValues, 162IncrementalValuesProvider<T2> associatedValues) 172public static IncrementalValuesProvider<SequenceEqualImmutableArray<T>> FilterAndReportDiagnostics<T>( 174IncrementalValuesProvider<SequenceEqualImmutableArray<DiagnosticOr<T>>> diagnosticOrValues)
IncrementalGeneratorInitializationContextExtensions.cs (3)
53public static void RegisterDiagnostics(this IncrementalGeneratorInitializationContext context, IncrementalValuesProvider<DiagnosticInfo> diagnostics) 61public static void RegisterDiagnostics(this IncrementalGeneratorInitializationContext context, IncrementalValuesProvider<Diagnostic> diagnostics) 69public static void RegisterConcatenatedSyntaxOutputs<TNode>(this IncrementalGeneratorInitializationContext context, IncrementalValuesProvider<TNode> nodes, string fileName)
IncrementalValuesProviderExtensions.cs (11)
12public static IncrementalValuesProvider<(T Left, U Right)> Zip<T, U>(this IncrementalValuesProvider<T> left, IncrementalValuesProvider<U> right) 44public static IncrementalValuesProvider<TNode> SelectNormalized<TNode>(this IncrementalValuesProvider<TNode> provider) 50public static (IncrementalValuesProvider<T>, IncrementalValuesProvider<T2>) Split<T, T2>(this IncrementalValuesProvider<(T, T2)> provider) 55public static IncrementalValuesProvider<T> Concat<T>(this IncrementalValuesProvider<T> first, IncrementalValuesProvider<T> second)
Microsoft.Maui.Controls.BindingSourceGen (2)
BindingSourceGenerator.cs (2)
18 var bindingsWithDiagnostics = context.SyntaxProvider.CreateSyntaxProvider( 32 var bindings = bindingsWithDiagnostics
Microsoft.Maui.Controls.SourceGen (4)
CodeBehindGenerator.cs (4)
42 var projectItemProvider = initContext.AdditionalTextsProvider 47 var xamlProjectItemProvider = projectItemProvider 52 var cssProjectItemProvider = projectItemProvider 69 var xamlSourceProvider = xamlProjectItemProvider
System.Private.CoreLib.Generators (1)
EventSourceGenerator.cs (1)
40IncrementalValuesProvider<EventSourceClass> eventSourceClasses =
System.Text.Json.SourceGeneration (1)
JsonSourceGenerator.Roslyn4.0.cs (1)
34IncrementalValuesProvider<(ContextGenerationSpec?, ImmutableEquatableArray<DiagnosticInfo>)> contextGenerationSpecs = context.SyntaxProvider
System.Windows.Forms.Analyzers.CSharp (1)
System\Windows\Forms\CSharp\Generators\ApplicationConfiguration\ApplicationConfigurationGenerator.cs (1)
77IncrementalValuesProvider<string?> syntaxProvider = context.SyntaxProvider.CreateSyntaxProvider(
System.Windows.Forms.PrivateSourceGenerators (2)
System\Windows\Forms\SourceGenerators\EnumValidationGenerator.cs (2)
40IncrementalValuesProvider<SyntaxNode> argumentsToValidate = context.SyntaxProvider.CreateSyntaxProvider( 74IncrementalValuesProvider<EnumValidationInfo> enumsToValidate = context.CompilationProvider.Combine(argumentsToValidate.Collect()).SelectMany(