I'm now running 10606 from the nightly builds, and it seems to be somewhat
fixed, but still not functioning. The error message now reads:

host.add_service_endpoint( IWcfContract, WSHttpBinding.new, Uri.new("...") )
=> :0: can't convert Module into ClrString (TypeError)

Running the code you suggested gives this:

>>> host.method(:add_service_endpoint).clr_members.each { |m| puts
m.to_string }
System.ServiceModel.Description.ServiceEndpoint
AddServiceEndpoint(System.String, System.ServiceModel.Channels.Binding,
System.String)
System.ServiceModel.Description.ServiceEndpoint
AddServiceEndpoint(System.String, System.ServiceModel.Channels.Binding,
System.String, System.Uri)
System.ServiceModel.Description.ServiceEndpoint
AddServiceEndpoint(System.String, System.ServiceModel.Channels.Binding,
System.Uri)
System.ServiceModel.Description.ServiceEndpoint
AddServiceEndpoint(System.String, System.ServiceModel.Channels.Binding,
System.Uri, System.Uri)
System.ServiceModel.Description.ServiceEndpoint
AddServiceEndpoint(System.Type, System.ServiceModel.Channels.Binding,
System.String)
System.ServiceModel.Description.ServiceEndpoint
AddServiceEndpoint(System.Type, System.ServiceModel.Channels.Binding,
System.String, System.Uri)
System.ServiceModel.Description.ServiceEndpoint
AddServiceEndpoint(System.Type, System.ServiceModel.Channels.Binding,
System.Uri)
System.ServiceModel.Description.ServiceEndpoint
AddServiceEndpoint(System.Type, System.ServiceModel.Channels.Binding,
System.Uri, System.Uri)

It looks like IronRuby is having to choose between (String, Binding, Uri)
and (Type, Binding, Uri), and is selecting the former (when I want it to
select the latter).

I've tried doing this

host.add_service_endpoint( IWcfContract.to_clr_type, WSHttpBinding.new,
Uri.new("...") )

but the error message is still the same (can't convert module to ClrString).

to_clr_type returns a System.RuntimeType - does this inherit from
System.Type or is it a different thing entirely? - my knowledge of the CLR
in this area is somewhat weak :-(

Thanks a lot
_______________________________________________
Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to