开发者

Castle Windsor IOC with Custom .NET Membership?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜