我想注入IOrchardServices
,Handler
因为我需要处理程序中的一些服务,所以在我的处理程序中我写了这个:
public class EstatePartHandler : ContentHandler
{
private readonly IOrchardServices Services;
public EstatePartHandler(IOrchardServices services)
{
Services = services;
}
...
}
但是Orchard
在构造处理程序时抛出异常:
Cannot choose between multiple constructors with equal length 1 on type 'Estate.Handlers.EstatePartHandler'. Select the constructor explicitly, with the UsingConstructor() configuration method, when the component is registered.
怎么了?