Example #1
0
        protected override void OnStart(string[] args)
        {
            // TODO:  在此处添加代码以启动服务。
            _server = WebApiStartup.RunWebServer();
            Task.Factory.StartNew(() =>
            {
                syncServiceThread = Thread.CurrentThread;

                SyncServiceClientStartup.AutoSync();
            });
            Task.Factory.StartNew(() =>
            {
                marketingThread = Thread.CurrentThread;
                MarketingManager.InitStoreMarketing();
            });
            Task.Factory.StartNew(() =>
            {
                clientThread = Thread.CurrentThread;

                client = new PosStoreClient();
            });
            //Task.Factory.StartNew(() =>
            //{
            //    storeManagerThread = Thread.CurrentThread;
            //    IISExpressSeverManager manager = new IISExpressSeverManager();
            //    var config = StoreManageCenterConfig.GetConfig();
            //    var path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Store");
            //    manager.Run(config.Port, path, "v4.0", "IIS");
            //});
        }