我正在尝试使用以下命令注册假身份验证服务以进行调试:
container.Register(Component
.For<Services.IFormsAuthenticationService>()
.ImplementedBy<Services.DebugAuthenticationService>());Services.DebugAuthenticationService实现Services.IFormsAuthenticationService的位置
但是我得到了这个错误:
单元测试适配器引发异常:未解析成员'Castle.MicroKernel.ComponentRegistrationException,Castle.MicroKernel,Version=2.1.0.0,Culture=neutral的类型=407dd0808d44fbdc‘.
发布于 2011-02-01 00:29:51
用于什么的组件?由什么实现的?你错过了类型。
在这里你可以找到一个正确使用Component.For ... ImplementedBy的例子
https://stackoverflow.com/questions/4853304
复制相似问题