CodeQL library for C#

Member predicate Indexer::getAnUltimateImplementee

Gets an interface member that is (transitively) implemented by this member, if any. That is, either this member immediately implements the interface member, or this member overrides (transitively) another member that immediately implements the interface member.

Note that this is generally not equivalent with getOverridee*().getImplementee(), as the example below illustrates:

interface I { void M(); }

class A { public virtual void M() { } }

class B : A, I { }

class C : A { public override void M() }

class D : B { public override void M() }
  • If this member is A.M then I.M = getAnUltimateImplementee().
  • If this member is C.M then it is not the case that I.M = getAnUltimateImplementee(), because C is not a sub type of I. (An example where getOverridee*().getImplementee() would be incorrect.)
  • If this member is D.M then I.M = getAnUltimateImplementee().
Indexer getAnUltimateImplementee()