private static void InitializeApp(App app) { _appBoot = new AppBoot(app); _appBoot.Initialize(); _appBoot.Navigate <MasterViewModel>(); _appBoot.Show(); }
public static AppBoot UseRedisPipeline(this AppBoot boot, RedisPipelineConfig config, Action <string> logAction = null) { var builder = new ContainerBuilder(); var redisManager = EngineContext.Current.Resolve <IRedisConnectionWrapper>(); builder.RegisterInstance(new RedisPipelineContext(redisManager, config, logAction)).As <IPipelineContext>().SingleInstance(); builder.Update(EngineContext.Current.ContainerManager.Container); return(boot); }
private static void InitializeApp(App app) { Application.Current.DispatcherUnhandledException += (sender, e) => { Logger.Log(new LogEntry(LoggingEventType.Fatal, "Unhandled Exception", e.Exception)); MessageBox.Show(e.Exception.Message, "An exception has occurred. ", MessageBoxButton.OK, MessageBoxImage.Error); }; LogViewModel.Write("Resources loaded"); LogViewModel.Write("Application starting"); Logger.Log(new LogEntry(LoggingEventType.Information, "EasyFarm Started ...")); _appBoot = new AppBoot(app); _appBoot.Initialize(); _appBoot.Navigate <MasterViewModel>(); _appBoot.Show(); }
static void Main() { var sentryKey = AppConfig.GetConfiguration("external:sentry:key"); var sentryId = AppConfig.GetConfiguration("external:sentry:id"); var hostUri = AppConfig.GetConfiguration("server:host_uri") ?? "http://*****:*****@sentry.io/{sentryId}")) { var host = new NancyHost(new Bootstrapper(), new Uri(hostUri)); AppBoot.Boot(); Console.WriteLine("Server version: " + Assembly.GetExecutingAssembly().GetName().Version); Console.WriteLine("Starting server"); Console.WriteLine("Starting server..."); host.Start(); Console.WriteLine("Server started"); Cli.CliLoop(CommandsList.Get()); } }
public static AppBoot UseWebDeault(this AppBoot boot) { EngineContext.Initialize(new MikeWebEngine()); boot.UseLog4(); var builder = new ContainerBuilder(); //builder.RegisterInstance(new RedisManager(config.RedisConn)).As<RedisCacheManager>().SingleInstance(); builder.RegisterApiControllers(EngineContext.Current.ContainerManager.Container.Resolve <ITypeFinder>().GetAssemblies().ToArray()) .InstancePerRequest(); builder.Update(EngineContext.Current.ContainerManager.Container); GlobalConfiguration.Configure(config => { config.Filters.Add(new MFExceptionAttribute()); }); return(new AppBoot()); }
private void Awake() { instance = this; UnityEngine.Debug.Log("AppBoot Awake"); }