Example #1
0
 public UserData()
 {
     display             = new Display();
     resourcesSettings   = new ResourcesSettings();
     appSettings         = new AppSettings();
     appDebugSettings    = new AppDebugSettings();
     mqttSettings        = new MQTTSettings();
     httpRequestSettings = new HTTPRequestSettings();
 }
Example #2
0
        public MqttHelper(IOptions <MQTTSettings> mqttSettings, ILogger log)
        {
            _log = log;
            _log.LogDebug("MqttHelper()");

            _mqttSettings = mqttSettings.Value;
            string pass = Environment.GetEnvironmentVariable(MQTT_PASS_ENVIRONMENT_NAME);

            _log.LogInformation("Initializing Mqtt. Host: {0} | User: {1}", _mqttSettings.Host, _mqttSettings.User);
            _mqttClient = InitializeMqtt(_mqttSettings.Host, _mqttSettings.User, pass);
        }