Ejemplo n.º 1
0
        private static async void MakePlanes()
        {
            for (int i = 0; i < 100000; i++)
            {
                await Task.Delay(2000);

                Plane a = _simulator.MakeNewPlanes();
                LogicService.SetStation(_station);
                _station.AddingNewPlane(a);
            }
        }
Ejemplo n.º 2
0
        private static void Main(string[] args)
        {
            _simulator = new SimulatorPlane.SimulatorPlane();
            _station   = new StationManager();
            StationManager.LoadingLists();
            StationManager.UpdateStations();

            MakePlanes();

            using (ServiceHost hosting = new ServiceHost(typeof(LogicService)))
            {
                hosting.Open();
                LogicService.SetStation(_station);
                Console.WriteLine($"Host started  {DateTime.Now}");
                Console.ReadLine();
            }
        }