My mistake, the container will track only those components that either
have decommission steps or have pooled lifestyle, since my
OrderService did not implement IDisposable it was not tracked.


On Jul 8, 10:06 pm, jobsamuel <[email protected]> wrote:
> With the following code:
>
>             IWindsorContainer container = new WindsorContainer();
>             container.Register(
>                 Component.For<OrderService>().LifeStyle.Transient,
>
> Component.For<INotifier>().ImplementedBy<DefaultNotifier>().LifeStyle.Trans­ient,
>
> Component.For<IInventoryService>().ImplementedBy<DefaultInventoryService>()­.LifeStyle.Transient
>                 );
>
>             OrderService orderService =
> container.Resolve<OrderService>();
>
> Console.WriteLine(container.Kernel.ReleasePolicy.HasTrack(orderService));
>
> I expected it to print true but it prints false. From what I have read
> I expect the container to track even my transient instances. So why
> does the HasTrack return false. The ReleasePolicy correctly shows
> LifeCycledComponentReleasePolicy

-- 
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.

Reply via email to