I'm still new at Roslyn
, so hopefully this isn't too stupid of a question.
What I'm looking for is a way to see if a class has implemented all the methods of an interface and if not, the highlight the interface, just like the built in "Implement interface" does.
So far I can see if the method name is implemented, but I haven't found a way to see if the right returntype is set on the method.
You can use
ITypeSymbol.FindImplementationForInterfaceMember
for this purpose.Basically what you'd need is to go through all
IMethodSymbol
s of the interface and check if the type in question defines a method which equals the returned value of the above method.Here's a draft: