File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed
src/Analyzers/Orchestration Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -128,27 +128,16 @@ bool IsILoggerType(ITypeSymbol type)
128128 return true ;
129129 }
130130
131- // Check if the type is ILogger<T> by checking if it implements ILogger
131+ // Check if the type implements ILogger interface (covers ILogger<T> case)
132132 if ( type is INamedTypeSymbol namedType )
133133 {
134- // Check all interfaces implemented by the type
135134 foreach ( INamedTypeSymbol interfaceType in namedType . AllInterfaces )
136135 {
137136 if ( SymbolEqualityComparer . Default . Equals ( interfaceType , this . iLoggerSymbol ) )
138137 {
139138 return true ;
140139 }
141140 }
142-
143- // Also check if the original definition matches (for generic types like ILogger<T>)
144- INamedTypeSymbol originalDefinition = namedType . OriginalDefinition ;
145- foreach ( INamedTypeSymbol interfaceType in originalDefinition . AllInterfaces )
146- {
147- if ( SymbolEqualityComparer . Default . Equals ( interfaceType , this . iLoggerSymbol ) )
148- {
149- return true ;
150- }
151- }
152141 }
153142
154143 return false ;
You can’t perform that action at this time.
0 commit comments