Hi all,
I need to implement .NET generic interface and pass this implementation
to
.NET generic method. Is it possible in IronRuby?
What I have in .NET:
interface Subscriber {
void Subscribe(IMessagesListener listener)
where TMessage : IBasicMessage;
}
public interface IMessagesListener<in TMessage>
where TMessage : IBasicMessage
{
void Handle(TMessage message);
}
I need to rewrite this code in ironruby:
class MyMessageListener :
IMessageListener
{
void IMessagesListener.Handle(TMyMessage
message)
{
}
}
subscriber.Subscribe(new MyMessageListener());
Is it possible?
Thanks in advance.
Best regards,
Arseny Sizov.
This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and delete this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.
Please refer to http://www.db.com/en/content/eu_disclosures.htm for
additional EU corporate and regulatory disclosures.