I believe it is 
UnitOfWork.current.method(:find).overloads(<signature>).call(<args>).

Check in the subfolders of merlin/Main/Languages/Ruby/Tests/interop/net/method/ 
for overload_spec.rb to see it.

JD

-----Original Message-----
From: Ivan Porto Carrero <i...@flanders.co.nz>
Sent: June 17, 2009 12:17 PM
To: ironruby-core <ironruby-core@rubyforge.org>
Subject: [Ironruby-core] is there a way to pick a method overload?



Hi

Is there a way to pick a CLR method overload?

var query = new Query();
UnitOfWorkScope.Current.Find<ChatMessage>(query);

That find method takes a Query type or a ProcedureQuery type where 
ProcedureQuery would be a stored proc call. Also ProcedureQuery is a more 
specialized version of a Query class.
Currently this method fails because IronRuby picks the overload with the 
ProcedureQuery and I'd like to be able to tell it to take the overload that 
takes Query. Can that be done?


---
Met vriendelijke groeten - Best regards - Salutations
Ivan Porto Carrero
Blog: http://flanders.co.nz
Twitter: http://twitter.com/casualjim
Author of IronRuby in Action (http://manning.com/carrero)

_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to