can you reproduce that in a test?

-- 
Krzysztof Kozmic


On Saturday, 21 September 2013 at 8:50 PM, Konstantin wrote:

> I have a manager that creates component instanses. To instantiated 
> componenets the typed factory is used, but once component is instanciated 
> manager is responsible for it's further setup and configuration.
> I'd like to controll the process of components disposing within manager. 
> Something like this in manager.Dispose method:
>         public void Dispose()
>         {
>             m_Logger.Info("Manager is disposing");
>             m_Logger.Info("Stopping components");
>             foreach (var component in m_Components)
>             {
>                 VerifyState(component);
>                 m_Factory.Release(component);
>             }
>             m_Logger.Info("Manager is disposed");
>         }
> 
> 
> But I get "System.ObjectDisposedException : The factory was disposed and can 
> no longer be used." when I try to use factory in Dispose.
> Looks like a bug to me - manager depends on factory thus container should 
> dispose manager before the factory...
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Castle Project Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> (mailto:[email protected]).
> To post to this group, send email to [email protected] 
> (mailto:[email protected]).
> Visit this group at http://groups.google.com/group/castle-project-users.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/castle-project-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to