Exemple #1
0
        static void Main(string[] args)
        {
            MyMqttClient mqttClient = new MyMqttClient();

            var generator = new CityGenerator();

            generator.LoadFile().Wait();
            foreach (City city in generator.GetAllLithuanianCities())
            {
                var device = new Device(mqttClient, city.id.ToString(), _preDeviceName + city.name.ToString());
                Task.Run(device.StartWorkAsync);
            }
        }