Beispiel #1
0
        public int MultiplyTestSucces(int x, int y)
        {
            ContainerBootstrapper.Initialise();
            var calculator = ServiceLocator.Current.GetInstance <ICalculator>();
            int result     = calculator.Multiply(x, y);

            return(result);
        }
 protected void Application_Start()
 {
     AreaRegistration.RegisterAllAreas();
     FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
     RouteConfig.RegisterRoutes(RouteTable.Routes);
     BundleConfig.RegisterBundles(BundleTable.Bundles);
     //Initialize IoC container/Unity
     ContainerBootstrapper.Initialise();
     //Register our custom controller factory
     ControllerBuilder.Current.SetControllerFactory(typeof(ControllerFactory));
 }