I have the following C# code, which I’m trying to translate to IronRuby
var host = new ServiceHost(typeof(MyService ));
host.AddServiceEndpoint(typeof(IWcfContract), new WSHttpBinding(), new
This compiles fine.
My ruby translation looks like this:
host = ServiceHost.new( MyService ) # this line works fine
host.add_service_endpoint( IWcfContract, WSHttpBinding.new,
As far as I can tell, that’s a direct translation and how it should
but the second line always throws
wrong number or type of arguments for `add_service_endpoint’
Is it something to do with the way IronRuby resolves overloads? that
has about 8 different overloads, but I’ve tried
passing in strings (and all the other overload combinations), and
Note which may be of use: The second parameter is typed to accept
System.ServiceModel.Channels.Binding, whereas the WSHttpBinding is about
or 4 steps down (up?) the inheritance tree from that. Could that be
Note 2: I’m running this particular IronRuby =>
At any rate:
- How can I figure out which overload IronRuby is deciding to call?
- How can I make it select the correct overload if it’s not doing so?