我在我的应用程序中使用了StructureMap。我需要为我的类创建一个实例,该实例也需要注入!我知道无法在Global.asax中注入任何内容。
反正Owin可以做到这一点吗? 这是我在Global.asax中创建的班级:
public class NotificationComponent : INotificationComponent
{
private IUnitOfWork _uow;
private readonly ISystemMessageManagement _systemMessageManagement;
public NotificationComponent(IUnitOfWork uow,ISystemMessageManagement systemMessageManagement)
{
_uow = uow;
_systemMessageManagement = systemMessageManagement;
}
,当我在Global.asax中创建NotificationComponent时,当然需要注入两个接口。
非常感谢。