Hi,

I've inherited a legacy application which used/abused Unity (instantiating a 
Unity container on every request, then stashing things in it that needed to 
be scoped to the lifetime of the request - ouch!) This all seems a bit 
wasteful to me, when I could just use Castle Windsor with the PerWcfRequest 
lifestyle.

The legacy system uses a custom ServiceHostFactory to add an 
IAuthorizationPolicy implementation to the ServiceHost and to instantiate 
and hook up the Unity container.

The AuthorizationPolicy has a concrete dependency on another class which 
does all the database lookups + caching information about the user. Is there 
an *elegant *way to inject this dependency in the constructor of the 
AuthorizationPolicy without having to introduce a dependency on the IOC 
container and using the Service Locator AntiPattern?
Or should I stop worrying and just implement the damn thing?

Thanks,

Dan

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/castle-project-users/-/uH88mq9mhnEJ.
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.

Reply via email to