Skip to content

Commit 9c6ed0a

Browse files
committed
C#: Add TargetAPI class.
1 parent 9ca199c commit 9c6ed0a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import csharp
2+
private import semmle.code.csharp.commons.Util
3+
4+
private predicate isRelevantForModels(Callable api) { not api instanceof MainMethod }
5+
6+
class TargetAPI extends Callable {
7+
TargetAPI() {
8+
[this.(Modifiable), this.(Accessor).getDeclaration()].isEffectivelyPublic() and
9+
this.fromSource() and
10+
isRelevantForModels(this)
11+
}
12+
}

0 commit comments

Comments
 (0)