@@ -69,11 +69,6 @@ class MicrosoftAspNetCoreMvcNonControllerAttribute extends MicrosoftAspNetCoreMv
69
69
}
70
70
}
71
71
72
- /** A `Microsoft.AspNetCore.Mvc.Controller` attribute. */
73
- class MicrosoftAspNetCoreMvcControllerAttribute extends MicrosoftAspNetCoreMvcAttribute {
74
- MicrosoftAspNetCoreMvcControllerAttribute ( ) { this .getType ( ) .hasName ( "ControllerAttribute" ) }
75
- }
76
-
77
72
/** The `Microsoft.AspNetCore.Antiforgery` namespace. */
78
73
class MicrosoftAspNetCoreAntiforgeryNamespace extends Namespace {
79
74
MicrosoftAspNetCoreAntiforgeryNamespace ( ) {
@@ -196,7 +191,7 @@ class MicrosoftAspNetCoreMvcControllerBaseClass extends Class {
196
191
197
192
/**
198
193
* A valid ASP.NET Core controller according to:
199
- * https://docs.microsoft.com/en-us/aspnet/core/mvc/controllers/actions?view=aspnetcore-3.1
194
+ * https://docs.microsoft.com/en-us/aspnet/core/mvc/controllers/actions?view=aspnetcore-3.1
200
195
* https://github.com/dotnet/aspnetcore/blob/b3c93967ba508b8ef139add27132d9483c1a9eb4/src/Mvc/Mvc.Core/src/Controllers/ControllerFeatureProvider.cs#L39-L75
201
196
*/
202
197
class MicrosoftAspNetCoreMvcController extends Class {
@@ -212,9 +207,16 @@ class MicrosoftAspNetCoreMvcController extends Class {
212
207
not this .isAbstract ( ) and
213
208
not this .containsTypeParameters ( ) and
214
209
(
215
- this .getABaseType * ( ) instanceof MicrosoftAspNetCoreMvcControllerBaseClass or
216
- this .getABaseType * ( ) .getName ( ) .matches ( "%Controller" ) or
217
- this .getABaseType * ( ) .getAnAttribute ( ) instanceof MicrosoftAspNetCoreMvcControllerAttribute
210
+ this .getABaseType * ( ) instanceof MicrosoftAspNetCoreMvcControllerBaseClass
211
+ or
212
+ this .getABaseType * ( ) .getName ( ) .matches ( "%Controller" )
213
+ or
214
+ this .getABaseType * ( )
215
+ .getAnAttribute ( )
216
+ .getType ( )
217
+ .getABaseType * ( )
218
+ // ApiControllerAttribute is derived from ControllerAttribute
219
+ .hasQualifiedName ( "Microsoft.AspNetCore.Mvc.ControllerAttribute" )
218
220
) and
219
221
not this .getABaseType * ( ) .getAnAttribute ( ) instanceof
220
222
MicrosoftAspNetCoreMvcNonControllerAttribute
0 commit comments