Add ability to define Init method to DefinitionFragment

0 views
Skip to first unread message

gnash

unread,
Oct 23, 2009, 11:05:05 AM10/23/09
to spring-recoil-main
Excellent library. I am missing one feature. I cannot seem to figure
out a way to set an init method. Below is the desired API.

Define<ItemWithDependencies>()
.Set(i => i.IntProp).To(() => 32)
.Set(i => i.DoubleProp).To(() => -7.3)
.Init(i => i.Init())
.AutoWire(AutoWiringMode.Constructor);

I would submit a patch but am not sure how to translate the lambda
into something that calls ObjectDefinitionBuilder.SetInitMethodName
(string).

Thanks.

gnash

unread,
Oct 23, 2009, 12:21:37 PM10/23/09
to spring-recoil-main
I figured it out after looking at some of the code that uses
Expressions. Where do I submit a patch?
Reply all
Reply to author
Forward
0 new messages