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);