File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -88,13 +88,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
8888 /// <returns>The bool</returns>
8989 private static bool IsHandlerCandidate ( SyntaxNode node )
9090 {
91- return node is ClassDeclarationSyntax classDeclaration &&
92- classDeclaration . BaseList != null &&
93- classDeclaration . BaseList . Types . Any ( baseType =>
94- baseType . Type is GenericNameSyntax genericName &&
95- ( genericName . Identifier . Text . Contains ( "RequestHandler" ) ||
96- genericName . Identifier . Text . Contains ( "NotificationHandler" ) ||
97- genericName . Identifier . Text . Contains ( "PipelineBehavior" ) ) ) ;
91+ return node is ClassDeclarationSyntax { BaseList : not null } ;
9892 }
9993
10094 // Retrieves handler information from a syntax context.
@@ -115,6 +109,11 @@ baseType.Type is GenericNameSyntax genericName &&
115109 return null ;
116110 }
117111
112+ if ( classSymbol . IsAbstract )
113+ {
114+ return null ;
115+ }
116+
118117 var implementedInterfaces = new List < string > ( ) ;
119118
120119 // Iterates through all implemented interfaces.
You can’t perform that action at this time.
0 commit comments