I wan't to implement the following C#/.Net interface with IronPython:
public static class Consumes<TMessage> where TMessage : class
{
public interface All
{
void Consume(TMessage message);
}
}
This is the python code I tried so far:
class TestMessage(object):
pass
class TestConsumer(Consumes[TestMessage].All):
def Consume(self, message):
pass
From this I get the following exception:
TypeError: TestConsumer: cannot inhert from open generic instantiation MassTransit.Consumes`1+All[TMessage]. Only closed instantiations are supported.
A valid C# class definition to implement this interface looks following:
public class TestConsumer : Consumes<TestMessage>.All
{
public void Consume(TestMessage msg) { }
}
So is it not possible to implement this kind of in IronPython? Or am I doing wrong?
Thank you in advance!