File tree Expand file tree Collapse file tree 2 files changed +18
-6
lines changed
csharp/ql/test/library-tests/dataflow/flowsources/aspremote Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change 1
1
using Microsoft . AspNetCore . Builder ;
2
2
using Microsoft . AspNetCore . Mvc ;
3
+ using System ;
3
4
4
5
namespace Testing
5
6
{
@@ -24,15 +25,24 @@ public object MyAction(ViewModel viewModel)
24
25
25
26
public class AspRoutingEndpoints
26
27
{
28
+ public delegate void MapGetHandler ( string delegateparam ) ;
29
+
30
+ public void HandlerMethod ( string param ) { }
31
+
27
32
public void M1 ( string [ ] args )
28
33
{
29
34
var builder = WebApplication . CreateBuilder ( args ) ;
30
35
var app = builder . Build ( ) ;
31
36
32
37
// The delegate parameters are considered flow sources.
33
38
app . MapGet ( "/api/redirect/{newUrl}" , ( string newUrl ) => { } ) ;
34
- app . MapGet ( "/{myApi}/redirect/{myUrl}" , ( string myApi , string myUrl ) => { } ) ;
39
+ app . MapGet ( "/{myApi}/redirect/{myUrl}" , ( string myApi , string myUrl ) => { } ) ;
40
+
41
+ Action < string > handler = ( string lambdaParam ) => { } ;
42
+ app . MapGet ( "/api/redirect/{lambdaParam}" , handler ) ;
35
43
44
+ MapGetHandler handler2 = HandlerMethod ;
45
+ app . MapGet ( "/api/redirect/{param}" , handler2 ) ;
36
46
app . Run ( ) ;
37
47
}
38
48
}
Original file line number Diff line number Diff line change 1
1
remoteFlowSourceMembers
2
- | AspRemoteFlowSource.cs:9 :23:9 :31 | RequestId |
2
+ | AspRemoteFlowSource.cs:10 :23:10 :31 | RequestId |
3
3
remoteFlowSources
4
- | AspRemoteFlowSource.cs:19:42:19:50 | viewModel |
5
- | AspRemoteFlowSource.cs:33:58:33:63 | newUrl |
6
- | AspRemoteFlowSource.cs:34:61:34:65 | myApi |
7
- | AspRemoteFlowSource.cs:34:75:34:79 | myUrl |
4
+ | AspRemoteFlowSource.cs:20:42:20:50 | viewModel |
5
+ | AspRemoteFlowSource.cs:30:42:30:46 | param |
6
+ | AspRemoteFlowSource.cs:38:58:38:63 | newUrl |
7
+ | AspRemoteFlowSource.cs:39:61:39:65 | myApi |
8
+ | AspRemoteFlowSource.cs:39:75:39:79 | myUrl |
9
+ | AspRemoteFlowSource.cs:41:46:41:56 | lambdaParam |
You can’t perform that action at this time.
0 commit comments