예제 #1
0
파일: App.xaml.cs 프로젝트: sruon/EasyFarm
 private static void InitializeApp(App app)
 {
     _appBoot = new AppBoot(app);
     _appBoot.Initialize();
     _appBoot.Navigate <MasterViewModel>();
     _appBoot.Show();
 }
예제 #2
0
        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);
        }
예제 #3
0
        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();
        }
예제 #4
0
        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());
            }
        }
예제 #5
0
파일: Extension.cs 프로젝트: fjsmlym8177/MF
        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());
        }
예제 #6
0
 private void Awake()
 {
     instance = this;
     UnityEngine.Debug.Log("AppBoot Awake");
 }