mirror of
https://github.com/github/codeql.git
synced 2026-05-03 04:39:29 +02:00
C#: Add TargetAPI class.
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import csharp
|
||||
private import semmle.code.csharp.commons.Util
|
||||
|
||||
private predicate isRelevantForModels(Callable api) { not api instanceof MainMethod }
|
||||
|
||||
class TargetAPI extends Callable {
|
||||
TargetAPI() {
|
||||
[this.(Modifiable), this.(Accessor).getDeclaration()].isEffectivelyPublic() and
|
||||
this.fromSource() and
|
||||
isRelevantForModels(this)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user