[Python.NET] Does python .net support creating a class inherited from an interface class declared by c#?

Oscar Le Oscar.Le at software.dell.com
Tue Apr 21 16:47:31 CEST 2015


Hi There,

I want to create a class which can be inherited from an interface class declared by c#.  But it throws TypeError when I instance it: "object does not implement IServiceCallbackContract".

class ServiceCallbackContract(IServiceCallbackContract):
    def __init__(self, c):
        pass

object = ServiceCallbackContract(AClass)

Then I added some debug messages in the Python.Net source code.
[cid:image001.png at 01D07C84.4EA703C0]

I mean I want to create a class as the implementation of the interface class which is declared by C# in a DLL file, I'm unable to change the code in that DLL file. So is there any way to make it works for my purpose by python.net?

Thanks,

Best regards,
Oscar Le

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythondotnet/attachments/20150421/2ab9a4f5/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 42660 bytes
Desc: image001.png
URL: <http://mail.python.org/pipermail/pythondotnet/attachments/20150421/2ab9a4f5/attachment-0001.png>


More information about the PythonDotNet mailing list