Castle.Windsor lifestyle depending on context?
问题 I have a web application where many components are registered using .LifestylePerWebRequest() , now I've decided to implement Quartz.NET , a .NET job scheduling library, which executes in separate threads, and not the Request thread. As such, HttpContext.Current yields null . My services, repositories, and IDbConnection were instanced so far using .LifestylePerWebRequest() because it made it easier to dispose of them when the requests ended. Now I want to use these components in both