从3.0.0更新Castle到3.2.1现在我不能使用FirstNonGenericCoreInterface

Ray*_*und 0 c# castle-windsor fluent-interface ioc-container s#arp-architecture

在我将Castle升级到3.2.1后,我似乎无法找到FirstNonGenericCoreInterface的正确替代品

我的代码

container.Register(
    AllTypes
        .FromAssemblyNamed("MySolution.Tasks")
        .InNamespace("MySolution.Tasks")
        .WithService.FirstNonGenericCoreInterface("MySolution.Domain"));
Run Code Online (Sandbox Code Playgroud)

该方法尚未过时,我找不到使用的方法

在此输入图像描述

有谁知道我应该用什么呢?

小智 5

如果我没弄错的话,FirstNonGenericCoreInterface是一种Sharp Architecture扩展方法.

如果您的实现类名称与接口匹配,WithService.DefaultInterfaces()应该执行您所需的操作.有关更多信息,请访问Castle Windsor wiki http://docs.castleproject.org/Default.aspx?Page=Registering-components-by-conventions&NS=Windsor&AspxAutoDetectCookieSupport=1