Yes, custom is an exception here as the recommended way to do it is via:
_container.Register(Component.For<SearchCache>().LifeStyle.Custom<YourCustomLifestyle>())); On 15/07/2011 1:09 PM, PandaWood wrote:
I was happy to remove an obsolete reference to this code: _container.AddComponentLifeStyle<SearchCache>(LifestyleType.Custom); And replace it with the recommended code: _container.Register(Component.For<SearchCache>().LifeStyle.Is(LifestyleType.Custom)); However when I do this, all is not well: "The attribute 'customLifestyleType' must be specified in conjunction with the 'lifestyle' attribute set to "custom" I did want to know, out of interest, how I would specify the Custom lifestyle as the message is requesting - as nothing about the API is hitting me over the head with the answer. Is the fact that the API is so happy for you to get it so wrong, something anyone would consider an issue or is it just me? The code I'm working with must obviously get defaulted to the Singleton lifestyle as there's no other code to give it a custom one.
-- 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.
