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<TMessage>(IMessagesListener<TMessage> 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 <TMyMessage> :
IMessageListener<TMyMessage>
{
void IMessagesListener<TMyMessage>.Handle(TMyMessage
message)
{
}
}
subscriber.Subscribe<TMyMessage>(new MyMessageListener<TMyMessage>());
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.
on 2010-11-09 09:59
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.