mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
17 lines
635 B
Plaintext
17 lines
635 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().getFullyQualifiedNameDebug(),
|
|
getLocation(f.getGetEnumerator()), f.getCurrent().getDeclaringType().getFullyQualifiedNameDebug(),
|
|
getLocation(f.getCurrent()), f.getMoveNext().getDeclaringType().getFullyQualifiedNameDebug(),
|
|
getLocation(f.getMoveNext())
|