环境:
Castle.Core 3.3
Castle.Windsor 3.4
1、注册类型.
IocManager.IocContainer.Register(
Component.For()
.ImplementedBy()
.LifeStyle.Singleton
);
2、我断点跟踪到Windsor项目中的 comonentRegistration.cs文件
请注意 “typeof(TService).GetHashCode()” = 45562356
3、下一步后,奇迹般的类型的hashcode会改变
这样注册,导致我根据注册的类型,无法得到我想要的对象
谢谢各位,帮帮忙,看看什么情况下hashcode会改变?