File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ [U] public void ClassNameContainsBaseShouldBeAbstract()
3535 var baseClassesNotAbstract = typeof ( IRequest ) . Assembly ( ) . GetTypes ( )
3636 . Where ( t => t . IsClass ( ) && ! exceptions . Contains ( t ) )
3737 . Where ( t => t . Name . Split ( '`' ) [ 0 ] . EndsWith ( "Base" ) )
38- . Where ( t => ! t . IsAbstract )
38+ . Where ( t => ! t . IsAbstractClass ( ) )
3939 . Select ( t => t . Name . Split ( '`' ) [ 0 ] )
4040 . ToList ( ) ;
4141
Original file line number Diff line number Diff line change @@ -30,6 +30,15 @@ internal static bool IsGeneric(this Type type)
3030#endif
3131 }
3232
33+ internal static bool IsAbstractClass ( this Type type )
34+ {
35+ #if DOTNETCORE
36+ return type . GetTypeInfo ( ) . IsAbstract ;
37+ #else
38+ return type . IsAbstract ;
39+ #endif
40+ }
41+
3342 internal static bool IsValue ( this Type type )
3443 {
3544#if DOTNETCORE
You can’t perform that action at this time.
0 commit comments