示例#1
0
        public void Start()
        {
            List <HttpRoute> routes = new List <HttpRoute>();

            routes.Add(new HttpRoute()
            {
                RouteTemplate = @"{controller}/{action}/{id}"
            });
            owin = new OwinHelper(@"https://127.0.0.1:11508", new OwinStart()
            {
                IsOpenSignalR     = true,
                IsCorss           = true,
                FileServerOptions = null,
                Routes            = routes,
                ResultToJson      = true,
                IsOpenWebApi      = true
            });
            owin.Start();
            Console.WriteLine("CameraHttpServer已启动!");
        }
示例#2
0
        protected override void OnStart(string[] args)
        {
            try
            {
                Quartz.Core.IOC.ObjectContainer.ApplicationStart(new Quartz.Core.IOC.AutoFacContainer());
                if (this.pcScheduler == null)
                {
                    pcScheduler = Scheduler.Create();
                }
                pcScheduler.Start();

                owinHelper = OwinHelper.Create(SysConfig <ProjectInstaller> .OwinPort);
                owinHelper.Start();
            }
            catch (Exception ex)
            {
                Log4.Error(ex.Message);
                Log4.Error(ex.StackTrace);
            }
        }
示例#3
0
        static void Main(string[] args)
        {
            ObjectContainer.ApplicationStart(new Quartz.Core.IOC.AutoFacContainer());

            //ITest _ITest = ObjectContainer.Current.Resolve<ITest>();
            //_ITest.SayHello();

            //Console.ReadLine();

            var pcScheduler = Scheduler.Create();

            pcScheduler.Start();


            OwinHelper owinHelper = OwinHelper.Create("8099");

            owinHelper.Start();
            Console.ReadLine();

            //Quartz.Core.Log4net.Log4.Info("test.......");
            //Console.ReadLine();
        }
示例#4
0
        static void Start()
        {
            Log4.Info("开始启动作业...");

            ObjectContainer.ApplicationStart(new Quartz.Core.IOC.AutoFacContainer());

            ITest _ITest = ObjectContainer.Current.Resolve <ITest>();

            _ITest.SayHello(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff") + "端口8099正在启动...");

            var pcScheduler = Scheduler.Create();
            //pcScheduler.Start();

            OwinHelper owinHelper = OwinHelper.Create("8099");

            owinHelper.Start();

            _ITest.SayHello(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff") + "端口8099启动成功!");

            Console.ReadLine();

            //Log4.Info(string.Format("【{0}】开始执行IJOB的[Execute]...","dddd"));
            //Console.ReadLine();
        }