This is escaping me, and I don't work with metadata enough to connect the dots. here is the setup
based on the type, how can I tell it implements IListener? It doesn't matter what the closed type is, only that it's implemented. for example:
thank in advance.
Jason Meckley
Programmer
faq855-7190
faq732-7259
Code:
interface IListener<T>
{
void Handle(T message);
}
class Presenter
: BaseClass
, IAnotherInterface
, IListener<This>
, IListener<That>
{
public void Handle(This message)
{
}
public void Handle(That message)
{
}
}
Code:
var listener = typeof(IListener<>);
var presenter = typeof(Presenter);
var implementsListener = presenter
.GetInterfaces()
.Any(interface => interface ???? listener);
//implementsListener is True
Jason Meckley
Programmer
faq855-7190
faq732-7259