mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
16 lines
603 B
Plaintext
16 lines
603 B
Plaintext
import csharp
|
|
|
|
private string getLocation(Member m) {
|
|
if m.fromSource() then result = m.getALocation().(SourceLocation).toString() else result = "-"
|
|
}
|
|
|
|
private string getIsAsync(ForeachStmt f) {
|
|
if f.isAsync() then result = "async" else result = "sync"
|
|
}
|
|
|
|
from ForeachStmt f
|
|
select f, f.getElementType().toString(), getIsAsync(f),
|
|
f.getGetEnumerator().getDeclaringType().getQualifiedName(), getLocation(f.getGetEnumerator()),
|
|
f.getCurrent().getDeclaringType().getQualifiedName(), getLocation(f.getCurrent()),
|
|
f.getMoveNext().getDeclaringType().getQualifiedName(), getLocation(f.getMoveNext())
|