CodeQL library for C#
codeql/csharp-all 0.9.0 (changelog, source)
Search

Member predicate LocalScopeVariable::getACapturingCallable

Gets a callable that captures this variable, if any. For example, v is captured by the nested lambda expression in

void M() {
  var v = "captured";
  Action a = () => {
    System.Console.WriteLine(v);
  }
}
Callable getACapturingCallable()