开发者

Overridding GetHashCode and Equals in Castle Dynamic Proxy 2.1 IModelInterceptorsSelector

I've read that in order to get caching and push performance when using an Interceptor Selector when using Castle Dynamic Proxy that I need to override GetTy开发者_JAVA百科pe(), GetHashCode() and Equals()

Where can I find an example of or what would be the best, from a performing perspective, implementation?


you can't override GetType, it's not virtual.

For the remaining ones, use the same technique you'd use for any other type. I generally make my selectors stateless, and implement the methods as this.GetType().GetHashCode() and This.GetType() == other.GetType()

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜