0
即时通讯使用NCommon与NHibernate,并希望使用StruceMap作为我的IOC。没有人知道如何使用StructureMap注册NCommon?如何使用StruceMap注册NCommon?
这是关于NCommon的信息。
https://github.com/riteshrao/ncommon/
下面是如何与温莎城堡进行
foreach (var type in types)
container.Register(Component.For<IController>().ImplementedBy(type)
.LifeStyle.Transient
.Named(type.Name.Replace("Controller", "")));
var containerAdapter = new NCommon.ContainerAdapter.CastleWindsor.WindsorContainerAdapter(container);