示例#1
0
        public static void Start(bool lazyStart = false)
        {
            if (lazyStart)
            {
                LazyStart = true;
                YmatouLoggingService.Debug("延迟启动...");
                return;
            }
            Status = YmatouFrameworkStatus.Starting;
            var watch = Stopwatch.StartNew();

            YmatouLoggingService.Debug("YmatouFramework开始启动...内部版本号:{0}", Version);

            bootstrapper = new Bootstrapper(container);
            if (bootstrapper.Execute())
            {
                Status = YmatouFrameworkStatus.Started;
                YmatouLoggingService.Debug("YmatouFramework启动完成!,耗时:{0} 秒...内部版本号:{1}", watch.ElapsedMilliseconds / 1000.0, Version);
            }
            else
            {
                Status = YmatouFrameworkStatus.FailedToStart;
                throw new Exception(string.Format("YmatouFramework启动失败!,耗时 {0} 秒 {1}", watch.ElapsedMilliseconds / 1000.0, Version));
            }
        }
示例#2
0
        public static void Stop()
        {
            Status = YmatouFrameworkStatus.Ending;

            LocalLoggingService.Info("YmatouFramework开始清理...内部测试版本号:{0}", Version);

            bootstrapper.Dispose();
            Status = YmatouFrameworkStatus.Ended;

            LocalLoggingService.Info("YmatouFramework清理完成!...内部测试版本号:{0}", Version);
            LocalLoggingService.Close();
        }
示例#3
0
        public static void Stop()
        {
            Status = YmatouFrameworkStatus.Ending;

            YmatouLoggingService.Debug("YmatouFramework开始清理");
            var watch = Stopwatch.StartNew();

            bootstrapper.Dispose();
            Status = YmatouFrameworkStatus.Ended;

            YmatouLoggingService.Debug("YmatouFramework清理完成!耗时 :{0}秒 ", watch.ElapsedMilliseconds / 1000.0);
        }
示例#4
0
        public static void Start(bool lazyStart = false)
        {
            if (lazyStart)
            {
                LazyStart = true;
                LocalLoggingService.Debug("延迟启动...");
                return;
            }
            Status = YmatouFrameworkStatus.Starting;

            LocalLoggingService.Info("YmatouFramework开始启动...内部测试版本号:{0}", Version);

            bootstrapper = new Bootstrapper(container);
            if (bootstrapper.Execute())
            {
                Status = YmatouFrameworkStatus.Started;
                LocalLoggingService.Info("YmatouFramework启动完成!...内部测试版本号:{0}", Version);
            }
            else
            {
                Status = YmatouFrameworkStatus.FailedToStart;
                throw new Exception(string.Format("YmatouFramework启动失败! {0} {1}", Version, ""));
            }
        }