Can any of existing IoC containers create the lazy proxy classes dynamically?

前端 未结 2 806
轮回少年
轮回少年 2021-01-06 14:29

I study different DI patterns. And now I interested in the lazy life-time implementation. For example, I want to write a proxy class that hides the factory behind a service\

2条回答
  •  说谎
    说谎 (楼主)
    2021-01-06 14:49

    Here is how it can be done in Castle:

    http://litemedia.info/lazy-loading-property-with-castle-dynamicproxy2

提交回复
热议问题