예제 #1
0
        // Originally the console project would have had only this as its Main
        // It will count up from zero and make each new result available for web viewing
        // at GET localhost:8080/latest_value
        static void OriginalConsoleProjectMain(BridgeService bridgeService)
        {
            var x         = 0.0;
            var increment = 1.0;

            while (true)
            {
                x += increment;
                Console.WriteLine("The value is now {0}", x);

                // This is the new line added to
                bridgeService.SetLatestValue(x);

                Thread.Sleep(100);
            }
        }
예제 #2
0
 public MyController(BridgeService bridgeService)
 {
     _bridgeService = bridgeService;
 }