File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed
src/MakingSense.AspNetCore.HypermediaApi/Linking Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change 1
- using System ;
1
+ using System ;
2
2
using System . Collections . Generic ;
3
3
using System . Collections . ObjectModel ;
4
4
using System . Linq ;
@@ -46,14 +46,14 @@ private static string ExtractControllerName(MethodInfo methodInfo)
46
46
}
47
47
48
48
public Maybe < Link > ToAction < T > ( Expression < Func < T , Task > > expression )
49
- where T : Controller
49
+ where T : ControllerBase
50
50
{
51
51
var methodCallExpression = ( MethodCallExpression ) expression . Body ;
52
52
return ToAction ( methodCallExpression . Method , methodCallExpression . Arguments ) ;
53
53
}
54
54
55
55
public Maybe < Link > ToAction < T > ( Expression < Action < T > > expression )
56
- where T : Controller
56
+ where T : ControllerBase
57
57
{
58
58
var methodCallExpression = ( MethodCallExpression ) expression . Body ;
59
59
return ToAction ( methodCallExpression . Method , methodCallExpression . Arguments ) ;
Original file line number Diff line number Diff line change 1
1
using MakingSense . AspNetCore . Abstractions ;
2
- using Microsoft . AspNetCore . Http ;
3
2
using Microsoft . AspNetCore . Mvc ;
4
3
using System ;
5
- using System . Collections . Generic ;
6
- using System . Linq ;
7
4
using System . Linq . Expressions ;
8
- using System . Reflection ;
9
5
using System . Threading . Tasks ;
10
6
11
7
namespace MakingSense . AspNetCore . HypermediaApi . Linking
12
8
{
13
9
public interface ILinkHelper
14
10
{
15
- Maybe < Link > ToAction < T > ( Expression < Func < T , Task > > expression ) where T : Controller ;
16
- Maybe < Link > ToAction < T > ( Expression < Action < T > > expression ) where T : Controller ;
11
+ Maybe < Link > ToAction < T > ( Expression < Func < T , Task > > expression ) where T : ControllerBase ;
12
+ Maybe < Link > ToAction < T > ( Expression < Action < T > > expression ) where T : ControllerBase ;
17
13
Maybe < Link > ToSelf ( object values = null ) ;
18
14
Maybe < Link > ToAbsolute ( string href ) ;
19
15
Maybe < Link > ToAbsolute ( Uri uri ) ;
You can’t perform that action at this time.
0 commit comments