/// <summary> /// 配置DI容器 /// </summary> /// <param name="cfg"></param> public override void Attach(Configuration cfg) { if (cfg == null) { throw new ArgumentNullException("cfg"); } NLiteEnvironment.Refresh(); }
public void Init() { NLiteEnvironment.Refresh(); var kerel = ServiceLocator.Current as IKernel; kerel.ListenerManager.Register(new NLite.Mini.Listener.SubscribeListener()); ServiceRegistry.Register <SimpleBus>(); bus = ServiceLocator.Get <IMessageBus>(); ServiceRegistry.Compose(this); }
public override void Given() { NLiteEnvironment.Refresh(); RegisterComponents(); ServiceRegistry.Compose(this); foreach (var item in Mappers) { item.Value.Initialize(); item.Value.Map(); } //DynamicAssemblyManager.SaveAssembly(); }
public override void Given() { NLiteEnvironment.Refresh(); RegisterComponents(); ServiceRegistry.Compose(this); }