mirror of
https://github.com/github/codeql.git
synced 2026-03-23 16:06:47 +01:00
17 lines
455 B
Plaintext
17 lines
455 B
Plaintext
/**
|
|
* @name Test for event access
|
|
*/
|
|
import csharp
|
|
|
|
from Method m, EventAccess e, DelegateCall d
|
|
where m.hasName("OnClick")
|
|
and e.getEnclosingCallable() = m
|
|
and e.getTarget().getName() = "Click"
|
|
and e.getTarget().getDeclaringType() = m.getDeclaringType()
|
|
and d.getEnclosingCallable() = m
|
|
and d.getDelegateExpr() = e
|
|
and d.getArgument(0) instanceof ThisAccess
|
|
and d.getArgument(1).(ParameterAccess).getTarget().hasName("e")
|
|
select m, d, e
|
|
|