开发者

Castle Windsor Castle.MicroKernel.ComponentRegistrationException

开发者 https://www.devze.com 2023-02-07 13:32 出处:网络
I am tring to register a fake Authentication Service for debuging using: container.Register(Component .For<Services.IFormsAu开发者_如何转开发thenticationService>()

I am tring to register a fake Authentication Service for debuging using:

container.Register(Component
    .For<Services.IFormsAu开发者_如何转开发thenticationService>()
    .ImplementedBy<Services.DebugAuthenticationService>());

where Services.DebugAuthenticationService implementes Services.IFormsAuthenticationService

but I get this error:

Unit Test Adapter threw exception: Type is not resolved for member 'Castle.MicroKernel.ComponentRegistrationException,Castle.MicroKernel, Version=2.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc'..


Component for what? Implemented by what? You're missing the types.

Here you can find an example of correctly using Component.For ... ImplementedBy:

Implementing UnitOfWork with Castle.Windsor

0

精彩评论

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