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

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)