public static async Task Main(string[] args)
        {
            RestaurantManager restaurantManager = new RestaurantManager();

            restaurantManager.AddSampleData();
            XmlSerializer xmlSerializer = new XmlSerializer(restaurantManager.GetType());

            RestaurantManager restaurant = new RestaurantManager();

            restaurant.AddSampleData();
            API api = new API(restaurant);
            int port;

            if (args.Length > 0)
            {
                port = Int32.Parse(args[0]);
            }
            else
            {
                TcpListener l = new TcpListener(IPAddress.Loopback, 0);
                l.Start();
                port = ((IPEndPoint)l.LocalEndpoint).Port;
                l.Stop();
                port = 51359;
            }

            Console.WriteLine("Port: " + port);
            Action <WebSocketConnection> action = api.HandleConnectedClient;

            WebSocketServer.Server(port, action);

            while (!finish)
            {
            }
        }
        public ViewControler()
        {
            restaurantManager = new RestaurantManager();
            dishViewModel     = new DishViewModel(restaurantManager);
            clientViewModel   = new ClientViewModel(restaurantManager);
            restaurantManager.AddSampleData();
            dishesNames                  = new List <string>();
            Menu                         = new ObservableCollection <Dish>();
            Card                         = new ObservableCollection <Dish>();
            Clients                      = new ObservableCollection <Client>();
            ActiveOrders                 = new ObservableCollection <Order>();
            CompletedOrders              = new ObservableCollection <Order>();
            CurrentOrderDisplayDishes    = new ObservableCollection <Dish>();
            ActiveDelivery               = new ObservableCollection <Order>();
            CompletedDeliveries          = new ObservableCollection <Order>();
            CurrentDeliveryDisplayDishes = new ObservableCollection <Dish>();


            reportSender = new ReportSender(restaurantManager, 15000);
            Task.Run(() => reportSender.SendReport());

            reportReceiver = new ReportReceiver(startReportDate, endReportDate, reportIncome);
            reportReceiver.Subscribe(reportSender);

            addDish          = new DelegateCommand(addDishToCard);
            clearCard        = new DelegateCommand(Clear);
            addClient        = new DelegateCommand(AddClient);
            createOrder      = new DelegateCommand(CreateOrder);
            completeOrder    = new DelegateCommand(CompleteOrder);
            completeDelivery = new DelegateCommand(CompleteDelivery);


            RefreshView();
        }