Groups
Groups
Sign in
Groups
Groups
spring-recoil-main
Conversations
About
Send feedback
Help
Add ability to define Init method to DefinitionFragment
0 views
Skip to first unread message
gnash
unread,
Oct 23, 2009, 11:05:05 AM
10/23/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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 PM
10/23/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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