@@ -26,7 +26,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
2626 {
2727 // Set up an incremental generator that regenerates when the 'RegistrationExtensions' class changes.
2828 // Capture the INamedTypeSymbol when it does.
29- IncrementalValuesProvider < INamedTypeSymbol > classDeclarations = context . SyntaxProvider
29+ var classDeclarations = context . SyntaxProvider
3030 . CreateSyntaxProvider (
3131 predicate : static ( s , _ ) => s is ClassDeclarationSyntax classSyn && classSyn . Modifiers . Any ( static m => m . IsKind ( SyntaxKind . PartialKeyword ) ) ,
3232 transform : static ( context , cancelToken ) =>
@@ -47,7 +47,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
4747 . Where ( static m => m is not null ) ! ;
4848
4949 // Just get our first one (will only be one instance anyway, we just need to convert to a single value provider).
50- IncrementalValueProvider < INamedTypeSymbol ? > firstSyntax
50+ var firstSyntax
5151 = classDeclarations . Collect ( ) . Select ( ( all , _ ) => all . FirstOrDefault ( ) ) ;
5252
5353 context . RegisterSourceOutput (
@@ -74,9 +74,9 @@ private static void Execute(SourceProductionContext spc, INamedTypeSymbol? regEx
7474 spc ,
7575 "RegistrationExtensions" ,
7676 "Register" ,
77- static ( int argCount , bool hasComponentContext ) => hasComponentContext ?
78- $ "DelegateInvokers.DelegateInvoker{ argCount } WithComponentContext" :
79- $ "DelegateInvokers.DelegateInvoker{ argCount } ",
77+ static ( int argCount , bool hasComponentContext ) => hasComponentContext
78+ ? $ "DelegateInvokers.DelegateInvoker{ argCount } WithComponentContext"
79+ : $ "DelegateInvokers.DelegateInvoker{ argCount } ",
8080 NumberOfGenericArgs ) ;
8181 }
8282
0 commit comments