Hi,

I have noticed that the ContainerWrapper (an instance of 
System.ComponentModel.IContainer) class registers components with the Kernel 
using AddComponentInstance.
This eventually results in a singleton lifestyle being applied - which is not 
particularly desirable, because it means that the added component will hang 
around in the lifestyle pool until the Kernel is disposed, even if the 
component is removed from the ContainerWrapper collection.
How can I change this call to AddComponentInstance to a Register call, with 
arguments that will allow a component instance to be registered in a way that 
will allow the same instance to be returned from all Resolve calls (singleton 
behavior), but will be removed when Release is called (transient behavior)?

Thanks

Adam Langley
Senior Developer
+64 9 486 9010
alang...@winscribe.com
www.winscribe.com

 Please consider the environment before printing this email!


-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to castle-project-us...@googlegroups.com.
To unsubscribe from this group, send email to 
castle-project-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en.

Reply via email to