开发者

Castle Windsor lifestyle for web-service

开发者 https://www.devze.com 2023-03-30 21:14 出处:网络
Let us suppose we are injecting instances of web-services via Castle Windsor. What is the scenario when I want to use Transient lifestyle for them or PerWebRequest one? What is the开发者_运维技巧 way

Let us suppose we are injecting instances of web-services via Castle Windsor. What is the scenario when I want to use Transient lifestyle for them or PerWebRequest one? What is the开发者_运维技巧 way to think? Thanks


If you want a new instance of a component every time you request one from the container, use Transient. If you want the same instance to be pulled from the container throughout the life of a single web request, use PerWebRequest.

0

精彩评论

暂无评论...
验证码 换一张
取 消