File tree Expand file tree Collapse file tree 7 files changed +58
-15
lines changed
csharp/ql/test/library-tests/partial Expand file tree Collapse file tree 7 files changed +58
-15
lines changed Original file line number Diff line number Diff line change 1+ | Partial.cs:3:18:3:39 | PartialMethodWithBody1 | true |
2+ | Partial.cs:4:18:4:42 | PartialMethodWithoutBody1 | true |
3+ | Partial.cs:5:17:5:23 | Method2 | false |
4+ | Partial.cs:11:17:11:23 | Method3 | false |
5+ | Partial.cs:16:18:16:42 | PartialMethodWithoutBody2 | true |
6+ | Partial.cs:17:17:17:23 | Method4 | false |
7+ | Partial.cs:22:17:22:23 | Method5 | false |
Original file line number Diff line number Diff line change 1+ import csharp
2+
3+ private boolean isPartial ( Method m ) { if m .isPartial ( ) then result = true else result = false }
4+
5+ from Method m
6+ where m .fromSource ( )
7+ select m , isPartial ( m )
Original file line number Diff line number Diff line change 1- partial class A
1+ partial class TwoPartClass
22{
3- partial void M ( ) ;
4- public void M2 ( ) { }
3+ partial void PartialMethodWithBody1 ( ) ;
4+ partial void PartialMethodWithoutBody1 ( ) ;
5+ public void Method2 ( ) { }
56}
67
7- partial class A
8+ partial class TwoPartClass
89{
9- partial void M ( ) { }
10- public void M3 ( ) { }
10+ partial void PartialMethodWithBody1 ( ) { }
11+ public void Method3 ( ) { }
1112}
13+
14+ partial class OnePartPartialClass
15+ {
16+ partial void PartialMethodWithoutBody2 ( ) ;
17+ public void Method4 ( ) { }
18+ }
19+
20+ class NonPartialClass
21+ {
22+ public void Method5 ( ) { }
23+ }
Original file line number Diff line number Diff line change 1- | Partial.cs:1:15:1:15 | A |
2- | Partial.cs:3:18:3:18 | M |
3- | Partial.cs:7:15:7:15 | A |
1+ | Partial.cs:1:15:1:26 | TwoPartClass |
2+ | Partial.cs:3:18:3:39 | PartialMethodWithBody1 |
3+ | Partial.cs:4:18:4:42 | PartialMethodWithoutBody1 |
4+ | Partial.cs:8:15:8:26 | TwoPartClass |
5+ | Partial.cs:14:15:14:33 | OnePartPartialClass |
6+ | Partial.cs:16:18:16:42 | PartialMethodWithoutBody2 |
Original file line number Diff line number Diff line change 1- | Partial.cs:1:15:1:15 | A | Partial.cs:3:18:3:18 | M |
2- | Partial.cs:1:15:1:15 | A | Partial.cs:4:17:4:18 | M2 |
3- | Partial.cs:1:15:1:15 | A | Partial.cs:10:17:10:18 | M3 |
4- | Partial.cs:7:15:7:15 | A | Partial.cs:3:18:3:18 | M |
5- | Partial.cs:7:15:7:15 | A | Partial.cs:4:17:4:18 | M2 |
6- | Partial.cs:7:15:7:15 | A | Partial.cs:10:17:10:18 | M3 |
1+ | Partial.cs:1:15:1:26 | TwoPartClass | Partial.cs:3:18:3:39 | PartialMethodWithBody1 |
2+ | Partial.cs:1:15:1:26 | TwoPartClass | Partial.cs:4:18:4:42 | PartialMethodWithoutBody1 |
3+ | Partial.cs:1:15:1:26 | TwoPartClass | Partial.cs:5:17:5:23 | Method2 |
4+ | Partial.cs:1:15:1:26 | TwoPartClass | Partial.cs:11:17:11:23 | Method3 |
5+ | Partial.cs:8:15:8:26 | TwoPartClass | Partial.cs:3:18:3:39 | PartialMethodWithBody1 |
6+ | Partial.cs:8:15:8:26 | TwoPartClass | Partial.cs:4:18:4:42 | PartialMethodWithoutBody1 |
7+ | Partial.cs:8:15:8:26 | TwoPartClass | Partial.cs:5:17:5:23 | Method2 |
8+ | Partial.cs:8:15:8:26 | TwoPartClass | Partial.cs:11:17:11:23 | Method3 |
9+ | Partial.cs:14:15:14:33 | OnePartPartialClass | Partial.cs:16:18:16:42 | PartialMethodWithoutBody2 |
10+ | Partial.cs:14:15:14:33 | OnePartPartialClass | Partial.cs:17:17:17:23 | Method4 |
Original file line number Diff line number Diff line change 1+ | Partial.cs:3:18:3:39 | PartialMethodWithBody1 | true |
2+ | Partial.cs:4:18:4:42 | PartialMethodWithoutBody1 | false |
3+ | Partial.cs:16:18:16:42 | PartialMethodWithoutBody2 | false |
Original file line number Diff line number Diff line change 1+ import csharp
2+
3+ private boolean hasBody ( Method m ) { if m .hasBody ( ) then result = true else result = false }
4+
5+ from Method m
6+ where m .fromSource ( ) and m .isPartial ( )
7+ select m , hasBody ( m )
You can’t perform that action at this time.
0 commit comments