I believe I have just found a tiny bug in the Controller.RenderMailMessage overload that takes a IDictionary<string, object> (Line 1427).
The overload is simply passing on the data supplied to the EmailTemplateService, yet since no implicit conversion between IDictionary<string, object> to IDictionary exists it will falsly call the
public Message RenderMailMessage(string templateName, string layoutName, object parameters)
instead of the
public Message RenderMailMessage(string templateName, string layoutName, IDictionary parameters)
method. Thus causing the ReflectionBasedDictionaryAdapter to throw an TargetParameterCountException.
I know I should try writing a testcase for this, but I'm still having trouble making MonoRail compile inside my Visual Studio or to make the tests compile and run through nant.
Anyway, the problem goes away by casting the generic IDictionary to a non-generic one. The right overload gets called and it then works.
Sorry I can't write a test right now.
Btw, this is how my build keeps breaking:
[echo] Running tests in 'Castle.Core.Tests'
[exec] Assembly not found: C:\Users\Daniel\Documents\open source\castle-trunk\build\net-3.5\debug\source\castle-trunk\build\net-3.5\debug\test-results\Castle.Core.Tests.dll-results.xml
greetings, Daniel Hölbling