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 9138346 commit d1307a5Copy full SHA for d1307a5
CommunityToolkit.Tooling.SampleGen/ToolkitSampleMetadataGenerator.Sample.cs
@@ -22,7 +22,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
22
{
23
var symbolsInExecutingAssembly = context.SyntaxProvider
24
.CreateSyntaxProvider(
25
- 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 }
26
static (ctx, _) => ctx.SemanticModel.GetDeclaredSymbol(ctx.Node))
27
.Where(static m => m is not null)
28
.Select(static (x, _) => x!);
0 commit comments