Beispiel #1
0
        public static void StartService()
        {
            try
            {
                //DeliveryNote d = new DeliveryNote();
                //d.foremanid = 1;
                //d.orderid = 4;
                //d.success = true;
                //DbHandler.addDeliveryNote(d);
                //
                //foreach (Order o in orders) {
                //    Console.WriteLine(o.Terminal);
                //}
                //List<DeliveryNote> notes = DbHandler.GetDeliveryNotes();
                //foreach(DeliveryNote d in notes)
                //{
                //    Console.WriteLine(d.orderid);
                //}

                int port = 50000;
                service = new AsyncService(port);
                service.Run();
                Console.ReadLine();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                Console.ReadLine();
            }
        }
        protected override void OnStart(string[] args)
        {
            int          port    = 8001;
            AsyncService service = new AsyncService(port, new CalcHandler());

            service.Run();
        }
Beispiel #3
0
 private void Start()
 {
     try
     {
         int          port    = 5000;
         AsyncService service = new AsyncService(port, this);
         service.Run(); // very specific service
     }
     catch (Exception ex)
     {
         Debug.Log(ex.Message);
     }
 }
Beispiel #4
0
 static void Main(string[] args)
 {
     try
     {
         AsyncService service = new AsyncService();
         service.Run();
         Console.ReadLine();
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
         Console.ReadLine();
     }
 }
Beispiel #5
0
 static void Main(string[] args)
 {
     try
     {
         AsyncService service = new AsyncService();
         service.Run();
         while (true)
         {
             Console.WriteLine("Long Task\n\r");
             Thread.Sleep(1000);
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
         Console.ReadLine();
     }
 }