NRefactory
NRefactory copied to clipboard
FindReferences.IsMemberMatch does not work for interface members
I'm using FindReferences.FindReferencesInFile to find all (explicit) implementations of an interface member.
Unfortunately, it's not working. I suspect member definitions are only matched if IsMemberMatch returns true and - at least for explicit implementations - IsMemberMatch returns false. The cause of this result is:
if (!isVirtualCall)
return false;
However, even if those two lines are commented out, the result is still false.
Note that, in this case, member.IsOverride is false.
Also, isInterfaceCall is also false because referencedMember.DeclaringTypeDefinition.Kind != TypeKind.Interface (it is instead a class)