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

Predicate getInvokedDisposeMethod

Gets the dispose method that will be invoked on a value x of type t when x.Dispose() is called.

Either the dispose method is (an override of) IDisposable.Dispose(), or an implementation of a method Dispose(bool) which is called from the IDisposable.Dispose() method inherited by t.

Import path

import semmle.code.csharp.frameworks.System
Method getInvokedDisposeMethod(ValueOrRefType t)