File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 2
2
using System . Collections . Generic ;
3
3
using System . Diagnostics . Contracts ;
4
4
using System . Linq ;
5
+ using System . Web . Http . Controllers ;
5
6
using System . Web . Http . Dispatcher ;
6
7
7
8
namespace ScriptCs . WebApi
@@ -28,14 +29,14 @@ internal static IEnumerable<Type> WhereControllerType(IEnumerable<Type> types)
28
29
{
29
30
Contract . Requires ( types != null ) ;
30
31
31
- return types . Where ( x => typeof ( System . Web . Http . Controllers . IHttpController ) . IsAssignableFrom ( x ) ) ;
32
+ return types . Where ( x => typeof ( IHttpController ) . IsAssignableFrom ( x ) && x != typeof ( IHttpController ) ) ;
32
33
}
33
34
34
35
internal static bool AllAssignableToIHttpController ( IEnumerable < Type > types )
35
36
{
36
37
Contract . Requires ( types != null ) ;
37
38
38
- return types . All ( x => typeof ( System . Web . Http . Controllers . IHttpController ) . IsAssignableFrom ( x ) ) ;
39
+ return types . All ( x => typeof ( IHttpController ) . IsAssignableFrom ( x ) ) ;
39
40
}
40
41
}
41
42
}
You can’t perform that action at this time.
0 commit comments