예제 #1
0
        private void Initialize()
        {
            valveController   = new SprinklerValveController();
            programController = new SprinklerProgramController(valveController);
            cloudDataSaver    = new CloudDataSaver();

            //Define a new instance of our HTTPServer on Port 8888
            HttpRestServer server      = new HttpRestServer(8888, appServiceConnection, valveController, programController);//, tempSensors);
            IAsyncAction   asyncAction = Windows.System.Threading.ThreadPool.RunAsync(
                (workItem) =>
            {       //Start the Sever
                server.StartServer();
            });

            WebServer    webServer    = new WebServer(8889);
            IAsyncAction asyncAction2 = Windows.System.Threading.ThreadPool.RunAsync(
                (workItem) =>
            {       //Start the Sever
                webServer.StartServer();
            });
        }
예제 #2
0
        private void Initialize()
        {
            valveController = new SprinklerValveController();
            programController = new SprinklerProgramController(valveController);

            //Define a new instance of our HTTPServer on Port 8888
            HttpRestServer server = new HttpRestServer(8888, appServiceConnection, valveController, programController);//, tempSensors);
            IAsyncAction asyncAction = Windows.System.Threading.ThreadPool.RunAsync(
                (workItem) =>
                {   //Start the Sever
                                server.StartServer();
                });

            WebServer webServer = new WebServer(8889);
            IAsyncAction asyncAction2 = Windows.System.Threading.ThreadPool.RunAsync(
                (workItem) =>
                {   //Start the Sever
                    webServer.StartServer();
                });


        }