/// <summary> /// MVC appliction start event /// </summary> protected void Application_Start() { // Register areas and routes AreaRegistration.RegisterAllAreas(); UMClientConfig.Register(); RouteConfig.RegisterRoutes(RouteTable.Routes); WebApiConfig.Register(GlobalConfiguration.Configuration); // Register global filters FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); // Register scripts and css bundles BundleConfig.RegisterBundles(BundleTable.Bundles); // Register unity configuration BootstrapConfig.Register(); //Register providers ProvidersConfig.Register(); // Register custom flag enum model binder ModelBinders.Binders.DefaultBinder = new CustomModelBinder(); AsyncManagerConfig.Register(); ActiveSessionManager.StartTimer(spanTicks: TimeSpan.FromHours(6).Ticks); // token expire time is 6 hours }
private void ShowMode() { BootstrapConfig config = (target as BootstrapConfig); int index = 0; switch (config.StartupWorld) { case TargetWorld.ClientAndServer: index = 2; break; case TargetWorld.Server: index = 1; break; } index = EditorGUILayout.Popup("Mode", index, options); switch (index) { case 2: _startupWorldProp.intValue = (int)TargetWorld.ClientAndServer; break; case 1: _startupWorldProp.intValue = (int)TargetWorld.Server; break; case 0: _startupWorldProp.intValue = (int)TargetWorld.Client; break; } }
/// <summary> /// MVC appliction start event /// </summary> protected void Application_Start() { // Register areas and routes AreaRegistration.RegisterAllAreas(); UMClientConfig.Register(); RouteConfig.RegisterRoutes(RouteTable.Routes); WebApiConfig.Register(GlobalConfiguration.Configuration); // Register global filters FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); // Register scripts and css bundles BundleConfig.RegisterBundles(BundleTable.Bundles); // Register unity configuration BootstrapConfig.Register(); //Register providers ProvidersConfig.Register(); // Register custom flag enum model binder ModelBinders.Binders.DefaultBinder = new CustomModelBinder(); AsyncManagerConfig.Register(); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); WebApiConfig.Register(GlobalConfiguration.Configuration); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); MappingConfig.RegisterMapping(); container = new WindsorContainer(); BootstrapConfig.Register(this.container); }
#pragma warning restore 649 #endregion #region Methods public void Boot(BootstrapConfig bootstrapConfig) { if (bootstrapConfig == null || !bootstrapConfig.AddMainMenu) { return; } if (_menuLoaders == null) { return; } foreach (var loader in _menuLoaders.Where(l => !l.Value.IsLoaded)) { loader.Value.Load(); } }
public void Boot(BootstrapConfig bootstrapConfig) { if (!bootstrapConfig.AddMainMenu) return; var menuContentRegion = MagicStrings.RegionNames.PUPPY_MAIN_MENU_CONTENT_REGION; if (bootstrapConfig.IsUsingCustomShell) { if (!RegionManager.Regions.ContainsRegionWithName(menuContentRegion)) { Logger.Log("MainMenu content region missing for custom shell", Category.Exception); throw new InvalidOperationException(string.Format(Resources._noMainMenuContentRegionException, menuContentRegion)); } } RegionManager.RegisterViewWithRegion(menuContentRegion, typeof (MainMenuView)); Logger.Log("Added MainMenu to region {RegionName:l}", Category.Info, null, menuContentRegion); Logger.Log("Finished booting {ClassName:l}", Category.Info, null, GetType().FullName); }
protected override BootstrapConfig GetBootstrapConfig() { BootstrapConfig config = base.GetBootstrapConfig(); string path = Path.Combine(Application.streamingAssetsPath, "App.json"); if (File.Exists(path)) { string cfgStr = File.ReadAllText(path); AppConfig appConfig = JsonUtility.FromJson <AppConfig>(cfgStr); string useServer = appConfig.ServerList[appConfig.UseServer]; Debug.Log($"UseServer:{useServer}"); string[] ips = useServer.Split(':'); config.IP = ips[0]; config.Port = ushort.Parse(ips[1]); } return(config); }
private static void RegisterConfigTypes(ContainerBuilder containerBuilder) { //FaraConfig is already registered (EngineContext) //containerBuilder.RegisterInstance(FaraConfig.Load()).As<FaraConfig>().SingleInstance(); containerBuilder.Register(cc => BootstrapConfig.Load()).AsSelf().SingleInstance(); }
public UserInstaller(BootstrapConfig bootstrapConfig) { _bootstrapConfig = bootstrapConfig; }