Ejemplo n.º 1
0
 private static void BootstrapContainer()
 {
     container = new WindsorContainer();
     container.Install(Configuration.FromAppConfig());
     container.Install(FromAssembly.This());
     var controllerFactory = new WindsorControllerFactory(container);
     ControllerBuilder.Current.SetControllerFactory(controllerFactory);           
 }
Ejemplo n.º 2
0
 private static void BootstrapContainer()
 {
     container = new WindsorContainer();
     container.AddFacility("transactionmanagement", new TransactionFacility());
     container.Install(Configuration.FromAppConfig());
     container.Install(FromAssembly.Named("com.Sconit.Persistence"));
     container.Install(FromAssembly.Named("com.Sconit.Service"));
     container.Install(FromAssembly.This());
     var controllerFactory = new WindsorControllerFactory(container);
     ControllerBuilder.Current.SetControllerFactory(controllerFactory);           
 }
Ejemplo n.º 3
0
        private void BootstrapContainer()
        {
            container = new WindsorContainer();
            container.AddFacility("transactionmanagement", new TransactionFacility());
            container.Install(Configuration.FromAppConfig());
            container.Install(FromAssembly.Named("com.Sconit.Persistence"));
            container.Install(FromAssembly.Named("com.Sconit.Service"));
            container.Install(FromAssembly.Named("com.Sconit.Service.FIS"));
            container.Install(FromAssembly.Named("com.Sconit.Service.SAP"));
            container.Install(FromAssembly.Named("com.Sconit.Service.SD"));
            container.Install(FromAssembly.This());
            var controllerFactory = new WindsorControllerFactory(container);
            ControllerBuilder.Current.SetControllerFactory(controllerFactory);

            //OrderMgrImpl orderMgr = (OrderMgrImpl)container.Resolve<IOrderMgr>();

            //#region 先暂时这样,以后可以用Castle.Facilities.EventWiring
            //orderMgr.OrderReleased += new OrderMgrImpl.OrderReleasedHandler(OnOrderReleased);
            //#endregion
        }