Example #1
0
 /// <summary>
 /// 配置DI容器
 /// </summary>
 /// <param name="cfg"></param>
 public override void Attach(Configuration cfg)
 {
     if (cfg == null)
     {
         throw new ArgumentNullException("cfg");
     }
     NLiteEnvironment.Refresh();
 }
Example #2
0
        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);
        }
Example #3
0
        public override void Given()
        {
            NLiteEnvironment.Refresh();
            RegisterComponents();
            ServiceRegistry.Compose(this);

            foreach (var item in Mappers)
            {
                item.Value.Initialize();
                item.Value.Map();
            }

            //DynamicAssemblyManager.SaveAssembly();
        }
Example #4
0
 public override void Given()
 {
     NLiteEnvironment.Refresh();
     RegisterComponents();
     ServiceRegistry.Compose(this);
 }