public async Task ConnectToAwsIoT()
        {
            try
            {
                AwsMqttConnection awsMqttConnection = new AwsMqttConnection
                {
                    Host      = cloudConnectionConfig.Host,
                    Region    = cloudConnectionConfig.Region,
                    AccessKey = cloudConnectionConfig.AccessKey,
                    SecretKey = cloudConnectionConfig.SecretKey
                };

                string signedRequestUrl = awsMqttConnection.SignRequestUrl();

                var factory = new MqttFactory();
                mqttClient = factory.CreateMqttClient();

                mqttClientOptions = new MqttClientOptionsBuilder()
                                    .WithWebSocketServer(signedRequestUrl)
                                    .Build();

                await mqttClient.ConnectAsync(mqttClientOptions);

                Logger.LogInfo("Connected successfully .....");
            }
            catch (Exception ex)
            {
                Logger.LogError(ex.Message);
                throw;
            }
        }
        public async Task ConnectToAwsIoT()
        {
            try
            {
                AwsMqttConnection awsMqttConnection = new AwsMqttConnection
                {
                    Host      = view.HostText,
                    Region    = view.RegionText,
                    AccessKey = view.AccessKeyText,
                    SecretKey = view.SecretKeyText
                };

                string signedRequestUrl = awsMqttConnection.SignRequestUrl();

                var factory = new MqttFactory();
                mqttClient            = factory.CreateMqttClient();
                mqttClient.Connected += MqttClient_Connected;
                mqttClient.ApplicationMessageReceived += MqttClient_ApplicationMessageReceived;

                mqttClientOptions = new MqttClientOptionsBuilder()
                                    .WithWebSocketServer(signedRequestUrl)
                                    .Build();

                await mqttClient.ConnectAsync(mqttClientOptions);

                Logger.LogInfo("Connected successfully .....");
            }
            catch (Exception ex)
            {
                Logger.LogError(ex.Message);
            }
        }