Esempio n. 1
0
        protected async void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            string appDataPath = Server.MapPath("~/app_data");
            var    filterUnpopulatedSectors = bool.Parse(WebConfigurationManager.AppSettings["FilterUnpopulatedSectors"]);

            MapService      = new TravellerMapService(filterUnpopulatedSectors);
            TradeEngineMgt  = new TradeEngineMgt(MapService, appDataPath);
            TradeEngineMgt2 = new TradeEngineMgt2(MapService, appDataPath);

            AnimalBuilderMgt.SetDataPath(appDataPath);
            AnimalBuilderAE.SetDataPath(appDataPath);
            CharacterBuilder = new CharacterBuilder(appDataPath);
            EquipmentBuilder = new EquipmentBuilder(appDataPath);

            HomeIndexViewModel = HomeIndexViewModel.GetHomeIndexViewModel(MapService, CharacterBuilder, EquipmentBuilder).Result;
        }