开发者

Castle Windsor IOC with Custom .NET Membership?

开发者 https://www.devze.com 2023-02-09 07:51 出处:网络
I have read about not being able to use a .NET Custom Membership with Castle Windor. Is this th开发者_如何学Ce case? Are there any work arounds?There are always workarounds. In this case you have to i

I have read about not being able to use a .NET Custom Membership with Castle Windor. Is this th开发者_如何学Ce case? Are there any work arounds?


There are always workarounds. In this case you have to implement a proxy pattern. You need to create an interface & an implementing object that proxies calls to the membership class.

There are also some interesting blogs about duck typing with windsor. By using duck typing could eliminate the need to create the proxy object yourself. You would only have to write an interface containing the methods you want to use from the membership class and Castle would take care of proxying the calls for you (but essentially it's the same pattern).

0

精彩评论

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