Exemple #1
0
        static void Minerva(string[] args)
        {
            ModifyInMemory.ActivateMemoryPatching();

            Options options = new Options();

            Parser.Default.ParseArguments <Options>(args)
            .WithParsed <Options>(o =>
            {
                Env.Instance.Initialize(o.ReportDir, o.Phase);
            });

            switch (Env.Instance.Phase)
            {
            case 1: Phase1(); break;

            case 2: Phase2(); break;

            case 3: Phase3(); break;

            default: Console.WriteLine("please enter 1,2 or 3..."); break;
            }

            Console.WriteLine("press any key to exit ...");
            Console.ReadKey();
        }
Exemple #2
0
        static void Main()
        {
            // 激活 Aspose.Words、Aspose.Pdf 等 Aspose 系统组件
            ModifyInMemory.ActivateMemoryPatching();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new FrmInit());
            //Application.Run(new frmImport());
        }
        /// <summary>
        /// 启动事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void App_Startup(object sender, StartupEventArgs e)
        {
            // 注册office许可证
            ModifyInMemory.ActivateMemoryPatching();

            //UI线程未捕获异常处理事件
            this.DispatcherUnhandledException += new DispatcherUnhandledExceptionEventHandler(App_DispatcherUnhandledException);
            //非UI线程未捕获异常处理事件
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
            //Task线程内未捕获异常处理事件
            TaskScheduler.UnobservedTaskException += TaskScheduler_UnobservedTaskException;
        }
Exemple #4
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            WebApiConfig.Register(GlobalConfiguration.Configuration);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            // 运行需要在程序启动时运行的临时任务
            TempTask.RunTempTasks();

            // 激活 Aspose.Words、Aspose.Pdf 等 Aspose 系统组件
            ModifyInMemory.ActivateMemoryPatching();
        }
        /// <summary>
        /// 启动应用程序
        /// </summary>
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            // 启动的时候清除全部缓存
            ICache cache = CacheFactory.CaChe();

            cache.RemoveAll(0);
            cache.RemoveAll(1);
            cache.RemoveAll(2);

            cache.RemoveAll(5);
            cache.RemoveAll(6);
            ModifyInMemory.ActivateMemoryPatching();
            //var actions = ControllerHelper.GetALLPageByReflection();
            //foreach (var item in actions)
            //{
            //    Debug.WriteLine(item);
            //}
        }
Exemple #6
0
 static AsposeLicense()
 {
     ModifyInMemory.ActivateMemoryPatching();
 }