I'm using typed factory to resolve transient components. Factory instance
is injected via ctor dependency. When consuming component (singleton) tries
to use factory in dispose method I get exception stating that factory is
disposed and can not be used. I thought container should dispose consuming
component first... Am I doing something wrong.
*factory*
> interface IApplicationInstanceFactory
> {
> ApplicationInstance Create(string applicationId, string name,
> Version version, ApplicationParams applicationParams, AppServerContext
> context);
> void Release(ApplicationInstance instance);
> }
*consuming component ctor*
> public Host(IApplicationInstanceFactory instanceFactory)
*registration *
> container.Register(
> Component.For<IApplicationInstanceFactory>().AsFactory(),
> Component.For<ApplicationInstance>().LifestyleTransient(),
> Component.For<IHost>().ImplementedBy<Host>().DependsOn(new { name =
> setup.Environment }),
> )
--
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/-/t8aIRzzuxS0J.
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.