Just use TypedFactoryFacility
http://docs.castleproject.org/Windsor.Typed-Factory-Facility-delegate-based-factories.ashx
@K
On 26/02/2012 3:33 AM, RyanL wrote:
My shop has gotten into the habit of registering most all dependencies
using Func<X> so that instantiation of the objects will occur only
when the object is first called on. Is there any way register all
default interfaces as Func<X> using the fluent interface? Personally
I think the usage of the pattern may be a result of other bad coding
practices (expensive item instantiation?) and maybe I should be trying
to move them away from the pattern. But just thought I'd ask the
question.. if I can do something like below but have my dependencies
resolve as Func<X>?
container.Register(AllTypes.FromThisAssembly()
.InSameNamespaceAs<Program>(true)
.WithService.DefaultInterfaces());
Thanks,
Ryan
--
You received this message because you are subscribed to the Google Groups "Castle
Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en.