Files
codeql/csharp/ql/test/library-tests/dispatch/viableCallable.ql

13 lines
533 B
Plaintext

import csharp
import semmle.code.csharp.dispatch.Dispatch
from DispatchCall call, Callable c
where
call.getLocation().getFile().getStem() = "ViableCallable" and
c = call.getADynamicTarget().getUnboundDeclaration() and
(c.fromSource() implies c.getFile().getStem() = "ViableCallable") and
(c instanceof Method implies c.getName().regexpMatch("M[0-9]*")) and
(c instanceof Accessor implies c.fromSource()) and
call.getCall().getEnclosingCallable().hasName("Run")
select call, c.toString(), c.getDeclaringType().toString()