We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b581d1 commit 9138346Copy full SHA for 9138346
CommunityToolkit.Tooling.SampleGen/ToolkitSampleOptionGenerator.cs
@@ -23,7 +23,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
23
{
24
var classes = context.SyntaxProvider
25
.CreateSyntaxProvider(
26
- static (s, _) => s is ClassDeclarationSyntax c && c.AttributeLists.Count > 0 || s is MethodDeclarationSyntax m && m.AttributeLists.Count > 0,
+ static (s, _) => s is ClassDeclarationSyntax { AttributeLists.Count: > 0 } or MethodDeclarationSyntax { AttributeLists.Count: > 0 }
27
static (ctx, _) => ctx.SemanticModel.GetDeclaredSymbol(ctx.Node))
28
.Where(static m => m is not null)
29
.Select(static (x, _) => x!);
0 commit comments